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 / Power Automate Parse J...
Power Automate
Unanswered

Power Automate Parse JSON is not understanding the array

(0) ShareShare
ReportReport
Posted on by 2,057 Season of Giving Solutions 2025

I am working with a 3rd party API which return a list of contracts, here is a sample of the JSON:-

 

{
 "OOH.wu.2023.9.53": {
 "Brand": "***",
 "Contract Number": "OOH.wu.2023.9.53",
 "Client Name": "****",
 "Sector": "FOODS",
 "Media_list": [
 {
 "Network": "****",
 "Amount": "4000.000",
 "Duration": "1 Month",
 "of_Faces": "1",
 "Start_Date": "01-Oct-2023",
 "End_Date": "01-Nov-2023",
 "Delivery Date": "01-Oct-2023"
 },
 {
 "Network": "****",
 "Amount": "4800.000",
 "Duration": "1 Month",
 "of_Faces": "1",
 "Start_Date": "01-Oct-2023",
 "End_Date": "01-Nov-2023",
 "Delivery Date": "01-Oct-2023"
 },
 {
 "Network": "****",
 "Amount": "4250.000",
 "Duration": "1 Month",
 "of_Faces": "1",
 "Start_Date": "01-Oct-2023",
 "End_Date": "01-Nov-2023",
 "Delivery Date": "01-Oct-2023"
 }
 ],
 "No of Faces": "3"
 },
 "OOH.wu.2023.7.50": {
 "Brand": "****",
 "Contract Number": "OOH.wu.2023.7.50",
 "Client Name": "****",
 "Sector": "****",
 "Media_list": [
 {
 "Network": "****",
 "Amount": "4250.000",
 "Duration": null,
 "of_Faces": "1",
 "Start_Date": "14-Aug-2023",
 "End_Date": "14-Sep-2023",
 "Delivery Date": "14-Aug-2023"
 },
 {
 "Network": "****",
 "Amount": "4250.000",
 "Duration": null,
 "of_Faces": "1",
 "Start_Date": "09-Aug-2023",
 "End_Date": "09-Sep-2023",
 "Delivery Date": "09-Aug-2023"
 }
 ],
 "No of Faces": "2"
 }
 
}

 

but when i use Parse JSON action inside my automated flow, it did not understand that i need to iterate over a list of contracts, rather it statically parse the objects as follow:-

 

johnjohnPter_0-1706489146588.png

 

For example, i was expecting to get one Brand property and when i chose it >> power automate will add ApplyToEach.. so is the issue with the JSON? or i can manage this inside my flow? as in our case we might get 10 contracts and not just 2 contracts

... any advice where is the issue and how i can fix it?

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

    Hi , @johnjohnPter 

    According to your description, do you mean you want to loop the [Brand] field in your json?

    And for your json, it is Object instead of an array so it can not loop in your side.

    For your need , you can try to use the Xpath to extract the data array you need from your json.

    This is my test json:

    {
     "OOH.wu.2023.9.53": {
     "Brand": "Brand1",
     "Contract Number": "OOH.wu.2023.9.53",
     "Client Name": "****",
     "Sector": "FOODS",
     "Media_list": [
     {
     "Network": "****",
     "Amount": "4000.000",
     "Duration": "1 Month",
     "of_Faces": "1",
     "Start_Date": "01-Oct-2023",
     "End_Date": "01-Nov-2023",
     "Delivery Date": "01-Oct-2023"
     },
     {
     "Network": "****",
     "Amount": "4800.000",
     "Duration": "1 Month",
     "of_Faces": "1",
     "Start_Date": "01-Oct-2023",
     "End_Date": "01-Nov-2023",
     "Delivery Date": "01-Oct-2023"
     },
     {
     "Network": "****",
     "Amount": "4250.000",
     "Duration": "1 Month",
     "of_Faces": "1",
     "Start_Date": "01-Oct-2023",
     "End_Date": "01-Nov-2023",
     "Delivery Date": "01-Oct-2023"
     }
     ],
     "No of Faces": "3"
     },
     "OOH.wu.2023.7.50": {
     "Brand": "Brand2",
     "Contract Number": "OOH.wu.2023.7.50",
     "Client Name": "****",
     "Sector": "****",
     "Media_list": [
     {
     "Network": "****",
     "Amount": "4250.000",
     "Duration": null,
     "of_Faces": "1",
     "Start_Date": "14-Aug-2023",
     "End_Date": "14-Sep-2023",
     "Delivery Date": "14-Aug-2023"
     },
     {
     "Network": "****",
     "Amount": "4250.000",
     "Duration": null,
     "of_Faces": "1",
     "Start_Date": "09-Aug-2023",
     "End_Date": "09-Sep-2023",
     "Delivery Date": "09-Aug-2023"
     }
     ],
     "No of Faces": "2"
     }
     
    }

     

    You can try to use this code to extract the [Brand] field.

    xpath( xml(json( concat( '{"root":' , string( outputs('Compose')) , '}' ) )) ,
    '//Brand//text()' )

    Then you can loop this Brand array in your side ;

    vyueyunmsft_0-1706492167547.png

    vyueyunmsft_1-1706492167634.png

    The result is as follows:

    vyueyunmsft_2-1706492194790.png

    For this , you can refer to :

    Solved: Getting JSON keys in flow - Power Platform Community (microsoft.com)

     

    If this reply can help you , you can click mark this reply as solution (Accept solution) which can help more people, thanks in advance! 

     

    Best Regards,

    Yueyun Zhang

     

  • johnjohnPter Profile Picture
    2,057 Season of Giving Solutions 2025 on at

    @v-yueyun-msft thanks for the reply. but as you can see i have lot of properties so is not there an easier way to extract the data?

  • v-yueyun-msft Profile Picture
    Microsoft Employee on at

    Hi , @johnjohnPter 

    As for your json, the field Name is not the static like this:

    OOH.wu.2023.7.50

    If this , it is hard to extract the value if the json key is dynamic . The best way is directly use the expression to extract your value.

     

     

     

    If this reply can help you , you can click mark this reply as solution (Accept solution) which can help more people, thanks in advance! 

     

    Best Regards,

    Yueyun Zhang

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 293 Super User 2026 Season 2

#2
trice602 Profile Picture

trice602 186 Super User 2026 Season 2

#3
11manish Profile Picture

11manish 144 Super User 2026 Season 2

Last 30 days Overall leaderboard