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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Parson JSON with Multi...
Power Automate
Answered

Parson JSON with Multiple Levels

(0) ShareShare
ReportReport
Posted on by 15

Hello,

 

I am trying to build a flow that uses an API that returns the JSON below. I am able to get the response and use Parse JSON to parse it successfully, but I am having problems getting access to the collection of "resources." The JSON has a "meta" level and a "resources" level.

 

The JSON sample below only has one resource (a single contact) but ultimately it will have multiple resources.

 

Once I have parsed the JSON I want to go through and get the data from each resource and use it in the flow. When I add an Apply to Each step I get the following options:

parse options.jpg

 

I have used an Apply to Each to cycle through resources and also to cycle through items (which embeds it in an Apply to Each for resources). But I can never seem to get access to the actual properties of the item like the first name of a contact.

 

How can I setup my flow so that I have access to the fields for each item returned?

 

Thank you in advance!

 

 

 

 

{
 "meta": {
 "per_page": 1,
 "total": 186,
 "pages": 186,
 "page": 1
 },
 "resources": [
 {
 "updated": "2021-01-06T14:38:56-0500",
 "creator": "Monroe Horn",
 "object_type": "contact",
 "is_editable": true,
 "record_type": "person",
 "updater": "Monroe Horn",
 "is_important": null,
 "children": [],
 "company_last_contacted": {
 "out": {
 "user_id": "5f89ccd2f92ea1782bc8c173",
 "deletion_tstamp": null,
 "type": "message",
 "object_id": "6f13b31a-1c6d-ede3-7c2c-1ffe918fb7f5",
 "tstamp": "2020-12-22T23:42:53"
 },
 "in": {
 "user_id": "5f89ccd2f92ea1782bc8c173",
 "deletion_tstamp": "2020-12-23T00:44:35.516000",
 "type": "message",
 "object_id": "76a33628-27f5-7275-19a2-46ce026fc988",
 "tstamp": "2020-12-23T00:08:51"
 }
 },
 "created": "2020-10-26T12:27:53-0400",
 "fields": {
 "parent company": [
 {
 "is_primary": false,
 "modifier": "",
 "extra_value": "5f96f909f92ea11d6dc855d5",
 "value": "Goulston & Storrs",
 "label": "parent company"
 }
 ],
 "first name": [
 {
 "is_primary": false,
 "modifier": "",
 "value": "Angel",
 "label": "first name"
 }
 ],
 "last name": [
 {
 "is_primary": false,
 "modifier": "",
 "value": "Garcia-Manso",
 "label": "last name"
 }
 ],
 "title": [
 {
 "is_primary": false,
 "modifier": "",
 "value": "PMO Director",
 "label": "title"
 }
 ],
 "linkedin": [
 {
 "is_primary": false,
 "modifier": "",
 "value": "https://www.linkedin.com/in/angelgarciamanso",
 "label": "linkedin"
 }
 ],
 "lead status": [
 {
 "is_primary": false,
 "modifier": "",
 "value": "Not Lead",
 "label": "lead status"
 }
 ],
 "discovered gender": [
 {
 "is_primary": false,
 "modifier": "",
 "value": "Male",
 "label": "discovered gender"
 }
 ],
 "phone": [
 {
 "is_primary": false,
 "modifier": "mobile",
 "value": "+1 (401) 793-1831",
 "label": "phone"
 }
 ],
 "email": [
 {
 "is_primary": false,
 "modifier": "work",
 "value": "agarcia225@gmail.com",
 "label": "email"
 }
 ],
 "lead type": [
 {
 "is_primary": false,
 "modifier": "",
 "value": "Colleague",
 "label": "lead type"
 }
 ]
 },
 "privacy": {
 "read": {
 "user_ids": [],
 "group_ids": []
 },
 "edit": {
 "user_ids": [],
 "group_ids": []
 }
 },
 "id": "5f96f909f92ea11d6dc855d0",
 "last_contacted": {
 "user_id": "5f89ccd2f92ea1782bc8c173",
 "deletion_tstamp": "2020-12-23T00:44:35.516000",
 "type": "message",
 "object_id": "76a33628-27f5-7275-19a2-46ce026fc988",
 "tstamp": "2020-12-23T00:08:51"
 },
 "creator_id": "5f89ccd2f92ea1782bc8c173",
 "avatar_url": "https://nimbleappcdn.azureedge.net/api/avatars/5b5af0359a4d8a278407e6a7/5f96f909f92ea11d6dc855d0/person/2",
 "reminder": null,
 "owner_id": "5f89ccd2f92ea1782bc8c173"
 }
 ]
}

 

 

 

 

 
Categories:
I have the same question (0)
  • Verified answer
    Paulie78 Profile Picture
    8,424 Moderator on at

    It's a bit of a tricky one because although it is easy to get to the bit you want which is all under "fields". Everything within that is an array, such as:

    "first name": [
     {
     "is_primary": false,
     "modifier": "",
     "value": "Angel",
     "label": "first name"
     }
     ]

    You wouldn't normally expect something like first name to be in an array, because how many first names can you really have 😂

     

    Same with gender, you can't be multiple genders (or maybe you can thesedays). But you get my point. Are you ever expecting to get more than one value in these arrays? If not you can use a first expression to avoid any loops. 

     

    Would you like me to knock something together for you quick? What fields are you actually interested in?

  • monroehorn Profile Picture
    15 on at

    That would be amazing. Thank you so much. I'm most interested in First Name, Last Name, and email addresses.

     

    I will be getting more than one pretty much all the time. I just pulled one back to keep the JSON sample short. I think the structure is strange, too. I don't see how I would have a "primary" first name or "primary" gender. It seems like they took properties that would be more complicated, like an address or phone number, and applied the same logic to all of the properties.

     

    Thanks again!

  • rohitsbots Profile Picture
    280 on at

    @monroehorn Did you get a solution for multi level JSON ?

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 641

#2
Vish WR Profile Picture

Vish WR 640

#3
Haque Profile Picture

Haque 495

Last 30 days Overall leaderboard