I have searched a lot and I found few methods to find the length of my JSON array. I have tried:
count
json.length
but these return 1, instead of the actual length. I want to show it using PHP.
My json is:
$huge = '[{"location":[{"building":["Default Building"],"name":"Default Location"}],"name":"Default Organization"},{"location":[{"building":["test_loc1_building1","test_loc1_building2"],"name":"test location1"},{"building":["test_loc2_building2"],"name":"test location2"}],"name":"test Organization"}]';
How can I find the number of objects in my JSON array?