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 / Parse JSON with changi...
Power Automate
Answered

Parse JSON with changing name

(0) ShareShare
ReportReport
Posted on by 49

How can I loop through or parse the following JSON received from JotForm? The question is in the 'name' part of the JSON, and the answer in the 'value'. The question can change with each response received so I can't use the normal expressions or Parse JSON function. 

 

notepad++_2022-09-02_12-53-53.png

 

Categories:
I have the same question (0)
  • v-xiaochen-msft Profile Picture
    Microsoft Employee on at

    Hi @grovercorner2 ,

     

    Unfortunately, power automate can't parse json with dynamic names.

    Please make sure that the name of key is unchanged.

    Hopefully it makes sense.

     

    Best Regards,

    Wearsky

  • grovercorner2 Profile Picture
    49 on at

    Yes, it makes sense, and I have no idea why a large SAAS provider like Jotform would implement something like this. But sadly there is a 0% chance they will change their API upon my request, and I can't wait for them to release a new version of their API.

  • Verified answer
    v-xiaochen-msft Profile Picture
    Microsoft Employee on at

    Hi @grovercorner2 ,

     

    I don't know if it is a solution but I want to share it.

    So the key is to get the dynamic field name.

    I create a simple sample.

    vxiaochenmsft_0-1662537204956.png

    split(split(string(variables('var')),'":"')?[0],'"')?[1]
    // We can use this expression to extract the field name 
     
    vxiaochenmsft_1-1662537319586.png
    variables('var')?[outputs('Compose')]
     
    vxiaochenmsft_2-1662537348024.png

     

    Now we can extract the values from the columns with dynamic name.

    But if your data is more complex, the expressions will also be more complex.

     

    Best Regards,

    Wearsky

  • grovercorner2 Profile Picture
    49 on at

    Thanks. I think this is a step in the right direction. But it doesn't take into account the json has multiple rows. How to isolate the first row to use as input to your steps?

  • v-xiaochen-msft Profile Picture
    Microsoft Employee on at

    Hi @grovercorner2 ,

     

    Could you share a json sample?

     

    Best Regards,

    Wearsky

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!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 251 Super User 2026 Season 1

#2
Haque Profile Picture

Haque 239

#3
Expiscornovus Profile Picture

Expiscornovus 220 Most Valuable Professional

Last 30 days Overall leaderboard