web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Need help Parsing JSON...
Power Automate
Unanswered

Need help Parsing JSON to CSV

(0) ShareShare
ReportReport
Posted on by 16

I'm using power automate to retrieve survey data from Customer Voice, my issue is the response is all coming in one column. I used Parse JSON to get the data, here's what the data look like (body from Parse JSON function):

[
  {
    "questionId""r3333444",
    "response""5"
  },
  {
    "questionId""r3333444555",
    "response""5"
  },
  {
    "questionId""r33334442233",
    "response""Yourself"
  },
  {
    "questionId""r33334442222",
    "response""John Doe"
  },
  {
    "questionId""r3333444998888",
    "response""email@yahoo.com"
  },
  {
    "questionId""r3333444334455",
    "response""111-222-3333"
  },
  {
    "questionId""r333344422344",
    "response""need help"
  },
  {
    "questionId""r33334442211111",
    "response""Opt-in"
  }
]
 
-------
I would like to get this to a CSV, the questionID supposed to be the question names, but it's only coming out as QuestionID.
Categories:
I have the same question (0)
  • DJ_Jamba Profile Picture
    2,837 Moderator on at

    Hi @pwruser123 

    Can you paste the survey data you are getting before you run it through a Parse JSON action?
    Remove any sensitive data

  • pwruser123 Profile Picture
    16 on at

    @DJ_Jamba Here's what the data looks like before Parse JSON action: 

     

    [{"questionId":"r3333444","response":"5"},

    {"questionId":"r3333444555","response":"5"},

    {"questionId":"r33334442233","response":"Yourself"},

    {"questionId":"r33334442222","response":"John Doe"},{"questionId":"r3333444998888","response":"email@yahoo.com"},

    {"questionId":"r3333444334455","response":"111-222-3333"},

    {"questionId":"r333344422344","response":"Need help"},{"questionId":"r0a19a484ddba431fae09671970a0b36b","response":"Opt-in"}]

     

    This is coming from a table in the Customer Voice Survey Response table, then I use List Row action. Here's the screenshot: 

    pwruser123_0-1712076763717.png

     

  • DJ_Jamba Profile Picture
    2,837 Moderator on at

    @pwruser123 

     

    I need whatever is inside this:

    DJ_Jamba_0-1712077783702.png


    not the schema

  • pwruser123 Profile Picture
    16 on at

    @DJ_Jamba 

    pwruser123_0-1712078126709.png

    This is what I sent, it's the responses in JSON format

  • Nived_Nambiar Profile Picture
    18,138 Super User 2026 Season 1 on at

    Hi @pwruser123 

     

    so you want to retrive questions names from dataverse instead of question id > am i correct ?

     

    Thanks & Regards,

    Nived N 🚀

    LinkedIn: Nived N's LinkedIn
    YouTube: Nived N's YouTube Channel
    Blog: Nived Nambiar's Blogs

    🔍 Found my answer helpful? Please consider marking it as the solution!
    Your appreciation keeps me motivated. Thank you! 🙌

     

  • pwruser123 Profile Picture
    16 on at

    @Nived_Nambiar Yes, I want to retrieve all the questions and their responses, right now it's coming has question IDs, which is fine, but need to get the JSON to a CSV so I can export it in a table format

  • Nived_Nambiar Profile Picture
    18,138 Super User 2026 Season 1 on at

    So how should expected format something like this 

     

    Question ID1, Question ID2, .....

    Response1, response 2.......

     

     

     

     

    where question ID should be headers and responses should be values, am i correct?

     

     

    Or in below format ?

     

    Nived_Nambiar_1-1712079903961.png

     

    This flow would help

    Nived_Nambiar_0-1712079851133.png

     

    Thanks & Regards,

    Nived N 🚀

    LinkedIn: Nived N's LinkedIn
    YouTube: Nived N's YouTube Channel
    Blog: Nived Nambiar's Blogs

    🔍 Found my answer helpful? Please consider marking it as the solution!
    Your appreciation keeps me motivated. Thank you! 🙌

     

  • pwruser123 Profile Picture
    16 on at

    @Nived_Nambiar yes, but right now, it's all showing up as just QuestionID for all questions

    here's an example: 

    [{"questionId":"r3333444","response":"5"},

    {"questionId":"r3333444555","response":"5"},

    {"questionId":"r33334442233","response":"Yourself"},

    {"questionId":"r33334442222","response":"John Doe"},{"questionId":"r3333444998888","response":"email@yahoo.com"},

    {"questionId":"r3333444334455","response":"111-222-3333"},

    {"questionId":"r333344422344","response":"Need help"},{"questionId":"r0a19a484ddba431fae09671970a0b36b","response":"Opt-in"}]

     

    so the questionids need to be headers, and the response should be rows, for each responses 

     

  • Nived_Nambiar Profile Picture
    18,138 Super User 2026 Season 1 on at

    Hi @pwruser123 

     

    see this flow (you have to make modifications to your existing flow)

     

    1. Initialize two variables after list rows action (one for array type, other for object type)

    Nived_Nambiar_0-1712081029218.png

     

    2. After parse json action, use apply to each loop again to loop through results of parse json 

     2.1 - inside that use compose action to add properties to tempObject variable

     2.3 then set the value from that compose action to tempObject 

    Nived_Nambiar_1-1712081175022.png

    addProperty(variables('tempObject'),items('Apply_to_each_2)?['questionId'],items('Apply_to_each_2)?['response']) 

     

    Nived_Nambiar_2-1712081204836.png

     

    3. After the loop , use append to array to append tempObject to FinalArr variable

    4. set the tempObject as {}

     

    Now outside of Apply to each loop, use create csv table action (I think you need to create csv table after looping through all).

    Nived_Nambiar_3-1712081357082.png

     

    Hope it helps !

    Thanks & Regards,

    Nived N 🚀

    LinkedIn: Nived N's LinkedIn
    YouTube: Nived N's YouTube Channel
    Blog: Nived Nambiar's Blogs

    🔍 Found my answer helpful? Please consider marking it as the solution!
    Your appreciation keeps me motivated. Thank you! 🙌

     

  • DJ_Jamba Profile Picture
    2,837 Moderator on at

    @pwruser123 
    Could you post a screenshot of your whole flow including the trigger?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 881

#2
Valantis Profile Picture

Valantis 823

#3
Haque Profile Picture

Haque 485

Last 30 days Overall leaderboard