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

Get first item in nested array from an array of objects

 

Hello,

 

I have an array of objects that gets returned to me from a POST method. Within each object is another array. My goal is get only the first item of that nested array (the first item in the "heirarchy" array".

 

Here is an eaxample of what is returned.

 

 

 

{
    "categories": [
        {
            "category_id": "10000000",
            "group": "special",
            "hierarchy": [
                "Bank Fees"
            ]
        },
        {
            "category_id": "10001000",
            "group": "special",
            "hierarchy": [
                "Bank Fees",
                "Overdraft"
            ]
        },
        {
            "category_id": "10002000",
            "group": "special",
            "hierarchy": [
                "Bank Fees",
                "ATM"
            ]
        },
        {
            "category_id": "10003000",
            "group": "special",
            "hierarchy": [
                "Bank Fees",
                "Late Payment"
            ]
        }
   ]
}
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: Get first item in nested array from an array of objects

2 REPLIES 2
Highlighted

Re: Get first item in nested array from an array of objects

Highlighted
Advocate I
Advocate I

Re: Get first item in nested array from an array of objects

Check this awsome video from Audrie, It answered this the best:

 

https://www.youtube.com/watch?v=PRKcQ0Q4BJE

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Upcoming Events

Experience what’s next for Power Automate

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Top Solution Authors
Top Kudoed Authors
Users online (6,967)