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

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Extract information fr...
Power Automate
Unanswered

Extract information from a JSON body without never ending loops

(0) ShareShare
ReportReport
Posted on by 93
Hi everyone,
 
I am using the HTTP action to return some information on documents, I would like to extract specific information like the webUrl of a document. The payload is very similiar to the below,
 
{
"
value": [
{
"
searchTerms": [
"
contoso"
],
"
hitsContainers": [
{
"
hits": [
{
"
hitId": "1",
"
rank": 1,
"
summary": "_summary-value",
"
resource": {
"@
odata.type": "#microsoft.graph.listItem",
"
id": "c23c7035-73d6-4bad-8901-9e2930d4be8e",
"
createdBy": {
"
user": {
"
displayName": "Bob",
"
email": "Bob@contoso.com"
}
},
"
createdDateTime": "2021-11-19T17:04:18Z",
"
lastModifiedDateTime": "2023-03-09T18:52:26Z"
}
}
],
"
total": 1,
"
moreResultsAvailable": false
}
]
}
]
}
 
How would I extract the createdDateTime? In PowerAutomate of course 
 
TIA
Categories:
I have the same question (0)
  • Suggested answer
    Paulie78 Profile Picture
    8,422 Moderator on at
    Extract information from a JSON body without never ending loops
    It depends if you want all possible results, or only the single result as per your example above. There is a whole bunch of nested arrays there so you could easily get multiple results. To get the createdDateTime from your example above you can use the expression:
     
    first(first(first(outputs('Compose')?['value'])?['hitsContainers'])?['hits'])['resource']?['createdDateTime']
     
    where outputs('Compose') â€‹â€‹â€‹â€‹â€‹â€‹â€‹is the name of the action that returns your result.
     

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

#2
Tomac Profile Picture

Tomac 456 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard