cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Jamie2
Helper I
Helper I

Using a nested JSON array in Power App

Hi, I have a nested JSON array from an API endpoint that I would like to use in a Power App. The nested array is titled 'PurchaseOrderList' as shown below (not showing all rows on the screenshot). Is there a way to use this nested array on a gallery?

 

I think I found a workaround by creating a collection in the app for the entire API endpoint called 'GetPurchaseOrders' and then creating a new collection called 'PurchaseOrders' using the following code: 

 

Clear(PurchaseOrders);ForAll(GetPurchaseOrders,Collect(PurchaseOrders,PurchaseOrderList))

 

Is there a better way of doing this? Can I avoid using sub collections like this? Not sure if 'sub collections' is the right terminology here!

 

Jamie2_1-1631650332678.png

 

1 ACCEPTED SOLUTION

Accepted Solutions

I couldn't get this to work so will continue using collections for now, thanks for your answer, perhaps I can use this in the future

View solution in original post

3 REPLIES 3
v-xiaochen-msft
Community Support
Community Support

Hi @Jamie2 ,

 

You could use ungroup() function.

vxiaochenmsft_0-1631849421470.png

vxiaochenmsft_1-1631849435868.png

vxiaochenmsft_2-1631849453662.png

 

Best Regards,

Wearsky

 

 

 

Thank you! I'll take a look 

I couldn't get this to work so will continue using collections for now, thanks for your answer, perhaps I can use this in the future

View solution in original post

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

secondImage

Power Apps Community Call

Please join us on Wednesday, October 20th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (1,882)