I'm trying to get the number of objects from a query but am failing to get the syntax correct.
As you can see it sees 2 Objects
And even the UI tells me there's 2 keys in the parent object, but I can't seem to get this value into the query. I've tried the obvious .length etc but can't get it.
This is to dynamically drive the number of rows in a listView.
If you're looking to grab the number of Objects from "Item.sites", which is expected to evaluate to 2, then you can use the Object.keys() method which will return an array of all your keys, then tag on the .length method which will tell you how many keys you have.
This would look like: Object.keys(query1.data.Item.sites).length