cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper II
Helper II

Parse json with multiple arrays

Hello experts,

 

I`m trying to parse JSON object from Power Automate to Powerapps.

(Need to store JSON data in powerapps collection)

 

A JSON from API is like this.

 

1.jpg

 

{ "total":863, "data":[ { "id":6154616, "categories":{ "total":0, "data":[ ] }, "isAnonymized":false, "jobOrders":{ "total":0, "data":[ ] }, "jobSubmissions":{ "total":0, "data":[ ] }, "lastName":"u engineering", "leads":{ "total":0, "data":[ ] }, "timeZoneOffsetEST":10 },{ "id":85456552, "categories":{ "total":0, "data":[ ] }, "isAnonymized":false, "jobOrders":{ "total":0, "data":[ ] }, "jobSubmissions":{ "total":0, "data":[ ] }, "lastName":"Engineering", "leads":{ "total":0, "data":[ ] }, "timeZoneOffsetEST":10 } ] }

 

 

As you can see JSON data contains multiple nested arrays, and data property will have multiple employee data.

So, to store this JSON data in powerapps collection, i have created power automate which has below steps.

 

JsonFlow.jpg

The flow of the Flow is like this. If the button on powerapps was clicked, it will call the API and get the result of JSON.

To store that json in collection i have used below formula's.

 

FlowOutput.jpg

 

But all four collection shows only property name of JSON, not showing data.
How can I get items from this type of JSON?

 

Any help is greatly appreciated.

2 REPLIES 2
Highlighted
Resolver II
Resolver II

Re: Parse json with multiple arrays

Hi! @sachinsoni441 

try just calling the flow 

Se(ResponseJson, ComplexJson-Fist.Run())

and store it in a record instead of a collection, from there you can extract the collection without calling the flow again.

 

Highlighted
Helper II
Helper II

Re: Parse json with multiple arrays

Hello @ilton ,

 

I have used below formula to store data in global variable.

Set(jsonVariable,'ComplexJSON-First'.Run().properties.data);

 

But how can i extract collection from it, as variable shows only type.

 

JSONType.jpg

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Robotic Process Automation

Let's talk about the solution provided by Microsoft for Robotic Process Automation (RPA)

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

Top Solution Authors
Top Kudoed Authors
Users online (8,307)