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

Community site session details

Session Id :
Power Automate - Building Flows
Answered

Retrieving inner arrays for PowerApps

(0) ShareShare
ReportReport
Posted on by 7

We have a web service that returns data in the following schema:

 "type": "object",
 "properties": {
 "total": {
 "type": "integer"
 },
 "per_page": {
 "type": "integer"
 },
 "current_page": {
 "type": "integer"
 },
 "last_page": {
 "type": "integer"
 },
 "next_page_url": {},
 "prev_page_url": {},
 "from": {
 "type": "integer"
 },
 "to": {
 "type": "integer"
 },
 "data": {
 "type": "array",
 "items": {
 "type": "object",
 "properties": {
 "created_at": {
 "type": "string"
 },
 "updated_at": {
 "type": "string"
 },
 "transferred_at": {
 "type": "string"
 },
 "est_departed_at": {
 "type": "string"
 },
 "est_arrival_at": {
 "type": "string"
 },
 "inventory_transfer_items": {
 "type": "array",
 "items": {
 "type": "object",
 "properties": {
 "created_at": {
 "type": "string"
 },
 "updated_at": {
 "type": "string"
 },
 "description": {
 "type": "string"
 },
 "qty": {
 "type": "string"
 },
 "price": {
 "type": "string"
 },
 "uom": {
 "type": "string"
 },
 "received_at": {
 "type": "string"
 },
 "received_qty": {
									"type": "string"
								},
 "inventory_type": {
 "type": "object",
 "properties": {
 "created_at": {
 "type": "string"
 },
 "updated_at": {
 "type": "string"
 },
 "name": {
 "type": "string"
 },
 "description": {
 "type": "string"
 },
 "net_weight": {
 "type": "string"
 },
 "packed_qty": {
											"type": "string"
										},
 "cost": {
 "type": "string"
 },
 "uom": {
 "type": "string"
 }
 }
 }
 },
 "required": [
 "created_at",
 "updated_at",
 "description",
 "qty",
 "price",
 "uom",
 "received_at",
 "received_qty",
 "inventory_name",
 "strain_name",
 "inventory_type"
 ]
 }
 }
 },
 "required": [
 "created_at",
 "updated_at",
 "transferred_at",
 "est_departed_at",
 "est_arrival_at",
 "inventory_transfer_items"
 ]
 }
 }
 }
}

Note there are two nested arrays in the return body - "inventory_transfer_items" and "inventory_type".

 

How do I access the inner arrays within PowerApps? The top level array "data" is no problem - but the next inner array "inventory_transfer_items" shows up as type object. I can't access the elements of "inventory_transfer_items" either. 

 

I want to store the results in a PowerApps collection. Thanks for your help!

I have the same question (0)
  • Verified answer
    v-bacao-msft Profile Picture
    on at
    Re: Retrieving inner arrays for PowerApps

    Hi @tbelvin ,

     

    The Schema you provided shows that the type of inventory_transfer_items seems to be array, and the inventory_type seems to be object.

    You could try to parse the return body directly using Parse JSON action.

     

    I did a test on my side, configured the Schema you provided in Parse JSON, and then traversed the elements in data in Apply to each.

    Traverse the elements in inventory_transfer_items in Apply to each 2.

     

    There are a lot of properties with the same name when using Dynamic content contained in Parse JSON. You could see which Apply to each is included.

    For example, there are three Created_at, if it is items(‘Apply_to_each’)[‘created_at’], it means that it is an property in the element contained in data.

    If it is items(‘Apply_to_each_2’)[‘created_at’], it is an property in the element contained in inventory_transfer_items.

    If it is items(‘Apply_to_each_2’)[‘ inventory_type’][‘created_at’], it is an property contained in inventory_type.

     

    Image reference:

    6.PNG

    Hope it helps.

     

    Best Regards,

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 691 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 431 Moderator

#3
developerAJ Profile Picture

developerAJ 266

Last 30 days Overall leaderboard