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

Grab the ID from JSON

(0) ShareShare
ReportReport
Posted on by 2

I have a HTTP GET method call to our service desk, we pass the email address via the URL and get the response (below). I'm after getting the ID into a variable after parsing the JSON but continue to run into problems. It will only ever return 1 result but keeps putting in a apply to each. Any help would be greatly appreciated.

 

 

{
 "status": "success",
 "message": null,
 "count": 1,
 "data": [
 {
 "id": 442,
 "brand_id": 1,
 "role": 0,
 "firstname": "firstname",
 "lastname": "secondname",
 "email": "user@ddomain.org",
 "confirmed": 0,
 "active": 1,
 "organisation_id": null,
 "organisation_access_level": null,
 "organisation_notifications": null,
 "country": null,
 "language_code": null,
 "timezone": null,
 "avatar": "R0lGODlhQABAANUAAAAAAP////7+/v39/fz8/Pv7+/r6+vn5+fj4+Pf39/b29vX19fT09PPz8/Ly8vHx8fDw8O/v7+7u7u3t7ezs7Orq6unp6ejo6Ofn5+bm5uXl5eTk5OPj4+Li4uHh4eDg4N/f393d3dzc3Nvb29ra2tnZ2djY2NfX19bW1tXV1dTU1NPT09LS0tHR0dDQ0M/Pz87Ozs3Nzcz",
 "template_mode": null,
 "notes": "",
 "twofa_enabled": 0,
 "twofa_secret": null,
 "twofa_token": null,
 "twitter_id": null,
 "twitter_handle": null,
 "facebook_id": null,
 "last_active_at": 1698322691,
 "created_at": 1642414443,
 "updated_at": 1694421977,
 "formatted_name": "full name",
 "avatar_url": "url",
 "organisation": null,
 "phonenumbers": [],
 "customfields": [],
 "groups": []
 }
 ]
}

 

Categories:
I have the same question (0)
  • ManishSolanki Profile Picture
    15,091 Super User 2025 Season 2 on at

    Hi @nathant 

     

    The reason is "data" property is an array of objects. So, when you fetch ID from the array, the flow automatically adds "Apply to each" action to traverse each object in "data" array.

     

     

     

    If this helps & solves your problem, please remember to give a 👍 and accept my solution as it will help others in the future.

     

     

  • Chriddle Profile Picture
    8,436 Super User 2025 Season 2 on at

    To grab the id of the first of these data array items use the following expression:

    first(body('Parse_JSON')['data'])['id']

     

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

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard