Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Unanswered

parsing complex Json

(1) ShareShare
ReportReport
Posted on by 38
 
I have a Json response from Power Automate that looks like this. 
{
"body": [
{
"summary": {
"duration": 665,
"length": 5619,
"baseDuration": 657
},
"polyline": "BF3-_mHgs3zbkMqBrOo2DjoBvHx7ByX8CmNlImtC0TyGsBiH_FoD"
},
{
"summary": {
"duration": 1358,
"length": 11563,
"baseDuration": 1224
},
"polyline": "BF_6inH8--zbgGnDrBhHzTxGmIltCpDhOg8B1WwnBsF6T1sFqU_oDuJrwD62CoLwD9BkClYyQsCH8D"
},
{
"summary": {
"duration": 719,
"length": 6421,
"baseDuration": 694
},
"polyline": "BFpj7mH4yuzbI7DxQrCpBkchzCjLrH2BtJmuDpUsnDzF05B_LrC"
}
]
}
 
 
I tried converting to string using string() in PowerAutomate before bringing it to PowerApps. 
Which got rid of the error but still could not extract the relevant data. 
 
  • scalca Profile Picture
    243 Super User 2025 Season 1 on at
    parsing complex Json
    depending on how you get your json string you can do the following
    it is always connected to your json structure and you have to specify the untyped object within powerapps in order to use them
     
    in your scenario what you can do is the following
    since you'll get an object array you have to loop through them
     
    try with 
    ForAll(ParseJson(api_output).body,
    {summary:
    {
    duration: Value(ThisRecord.summary.duration),
    length: Value(ThisRecord.summary.length),
    baseDuration: Value(ThisRecord.summary.baseDuration)
    },
    polyline: Text(thisRecord.polyline)
    }
    )
     
    this will return a table with two columns (summary of type Record and Polyline of type Text)
     
    you can store this into a collection or use it directly in a gallery
     
  • Meekou Profile Picture
    189 Super User 2025 Season 1 on at
    parsing complex Json
    How did you return value from Power Automate?
     
    Based on the error, it seems PowerApps already convert the string to object.
     
    Try to use like 
     
    First(api_output.body).summary.length
    Pay attention that your body is an array, you need to loop body to get every summary
     
    Best Regards,
    Meekou

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,660 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,999 Most Valuable Professional

Leaderboard