I'm working with some Json that is similar to:
{
"Apps" : [
{
"Name" : "app1",
"id" : "1",
"groups" : [
{ "id" : "1", "name" : "test group 1", "desc" : "this is a test group" },
{ "id" : "2", "name" : "test group 2", "desc" : "this is another test group" }
]
}
]
}
If I parse it in jquery to return an object and I'm iterating through the apps like so:
$.each(myJsonObject.Apps, function() { ... };
How can I get the length of this.groups ?
I've tried
- this.groups.length
- this.groups.length()
- $(this).groups.length()
and I cannot find any decent documentation on multiple tier json objects that have good information.
Any links or examples or suggestions would be appreciated.
groupsin the JSON is all lowercase, but your code samples haveGroups.