Forum Discussion
/stats returning JSON nested objects instead of array?
That's not what I would call 'nested objects'. That's a hash with the name of the object used as a key. There's nothing inherently more difficult in passing through a hash, and it has the advantage that you can access each object directly (by key) rather than having to search from one end o the array to the other.
I thought you mean it was somehow corrupted and one object was nested inside the previous one. But it looks fine to me.
If you think about it, it makes sense... When grabbing the list of virtual you're probably going to run through them from one to the next anyway, because at the end of the day the only data is its name. But when accessing stats it's nicer to be able to directly grab the object you're interested in rather than having to run through the array and then work out where the data is for the object you're most interested in (Obviously if you wanted just one object you'd not have to worry about that)
As a programmer I think it makes far more sense the way they produce the data now.
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com