cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Regular Visitor

Can't get key of object that is a numeric ID.

I'm working with an API that returns results of a search in the form of multiple nested objects. The root object contains a list of objects where the keys of those objects are ID numbers.

The API returns JSON in the format below

 

 

{
    "response": {
        "214938": {
            "orderId": 163244,
            "warehouseId": 2,
            "transfer": false,
            "priority": false,
            "status": {
                "shipped": true,
                "packed": true,
                "picked": true,
                "printed": true
            }
        },
        "223579": {
            "orderId": 169875,
            "warehouseId": 1,
            "transfer": false,
            "priority": false,
            "status": {
                "shipped": true,
                "packed": true,
                "picked": true,
                "printed": true
            }
        }
    }
}

 

 

I wish to capture the ID's which are the keys of the objects listed within the 'response' object. These ID's are not available anywhere else in the API so I need to find a way to achieve this with the given JSON. All of my research has not yielded anything that points me in the right direction.

Is this achievable? Am I missing something obvious?

Thanks!

 

 

1 REPLY 1
Highlighted
Super User
Super User

Re: Can't get key of object that is a numeric ID.

Longshot, John Liu might have a way for you to start: http://johnliu.net/blog/2017/11/foreach-property-in-microsoftflow-json-with-xpath-microblog?rq=xpath...

 

Please click Accept as Solution if it resolved your problem or give it a Thumbs Up if it helped you in anyway this will allow other people to search correct solutions effectively.

Thanks,
Rahber

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,176)