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 / Getting Data from HTTP...
Power Automate
Unanswered

Getting Data from HTTP JSON Nested Objects

(0) ShareShare
ReportReport
Posted on by 15

Hi, i'm trying to Access Data from a HTTP Request Using Parse JSON but the data is in Nested Objects.

This is the Complete Body im getting.
http://txt.do/186v1

But i only need the part

"factMap": {
"0!T": {
"aggregates": [
{
"label": "$0.00",
"value": 0
},
{
"label": "1",
"value": 1
},
{
"label": "0",
"value": 0
},
{
"label": "10.0%",
"value": 10
},
{
"label": "$0",
"value": 0
},
{
"label": "-",
"value": null
},
{
"label": "10",
"value": 10
}
]
},
"1!T": {
"aggregates": [
{
"label": "$4,350.00",
"value": 4350
},
{
"label": "15",
"value": 15
},
{
"label": "0",
"value": 0
},
{
"label": "15.8%",
"value": 15.8
},
{
"label": "$290",
"value": 290
},
{
"label": "-",
"value": null
},
{
"label": "95",
"value": 95
}
]
},
"2!T": {
"aggregates": [
{
"label": "$17.00",
"value": 17
},
{
"label": "0",
"value": 0
},
{
"label": "0",
"value": 0
},
{
"label": "0.0%",
"value": 0
},
{
"label": "-",
"value": null
},
{
"label": "-",
"value": null
},
{
"label": "1",
"value": 1
}
]
},
"T!T": {
"aggregates": [
{
"label": "$4,367.00",
"value": 4367
},
{
"label": "16",
"value": 16
},
{
"label": "0",
"value": 0
},
{
"label": "15.1%",
"value": 15.1
},
{
"label": "$273",
"value": 273
},
{
"label": "-",
"value": null
},
{
"label": "106",
"value": 106
}
]
}
}

The 0!T, 1!T, 2!T represents Table Rows. I need the "value" from each row. 
The Flow needs to be generic so any number of Rows it gets, it can parse the Data. If someone can help me it would be great.

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

    Hi @Faisal_Wasim :

    Do you want to get the value of 'factMap' form the object?

    If so,the expression should be:

    TheObject?['factMap']

    I've made a test for your reference:

    1\I created a variable of Object type as the return value of the "HTTP Request"

     

    2\The expression

    variables('TheObject')?['factMap']

    1.JPG

    The Result:

     2.JPG

    Best Regards,

    Bof

  • Faisal_Wasim Profile Picture
    15 on at

    Hey Thanks for replying.
    Yes this is ok, i can get factmap from this, but now i have to loop through each item of factmap so i can access the "value" in each "aggregate".

    I cannot loop through because its an Object not Array 😞

  • Paulie78 Profile Picture
    8,422 Moderator on at

    Are you only interested in the value, or do you also need the header value (like 0!T)

  • Faisal_Wasim Profile Picture
    15 on at

    not interested in the header value but i think it will be needed to loop through each item, like 0!T, 1!T
    these are actually rows from a table that i get from HTTP Request

  • Verified answer
    Paulie78 Profile Picture
    8,422 Moderator on at

    I've done it, but don't have time to explain the method. The output of my flow from your data above produced the array output:

    [
     "0",
     "1",
     "0",
     "10",
     "0",
     null,
     "10",
     "4350",
     "15",
     "0",
     "15.8",
     "290",
     null,
     "95",
     "17",
     "0",
     "0",
     "0",
     null,
     null,
     "1",
     "4367",
     "16",
     "0",
     "15.1",
     "273",
     null,
     "106"
    ]

     I've exported the flow, which you can download to see how it works, download and import into your environment:

    https://www.tachytelic.net/wp-content/uploads/Nested-JSON_20210126125317.zip

     

  • Faisal_Wasim Profile Picture
    15 on at

    Really Appreciate the help. This is Great. but the issue is that i want to run a loop on each of the item rows i.e: 0!T, 1!T, 2!T so on if any new rows are added, and add a compare function to the inner values.

    like, foreach(factmap)
    {

    compare (aggregate[4]?[value]>1000 )
    }

    ...  but the issue is factmap is an object so cannot use foreach.
    Sorry for the trouble 

  • Paulie78 Profile Picture
    8,422 Moderator on at

    Yes, that is why I asked if you cared about the headers or values only. But I have a solution for that. It's just a small adaptation to the flow I gave you the link for.

  • Faisal_Wasim Profile Picture
    15 on at

    oh sorry my bad. thankyou please let me know the adaptation 🙂

  • Faisal_Wasim Profile Picture
    15 on at

    Ok got it working by making tweaks to the flow you sent. Many Thanks

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 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard