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 Automate - Building Flows
Suggested answer

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
I have the same question (0)
  • Suggested answer
    Paulie78 Profile Picture
    8,418 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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 655 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 371 Moderator

#3
chiaraalina Profile Picture

chiaraalina 276

Last 30 days Overall leaderboard