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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Parse JSON with changi...
Power Automate
Unanswered

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
    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
    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
    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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 406 Moderator

#3
abm abm Profile Picture

abm abm 245 Most Valuable Professional

Last 30 days Overall leaderboard