Hey guys,
I am getting the following response from Ajax:
[{"Account Name":[{"id":"944ef382-becc-102b-baf8-000c29f242f5","priority":"1","creator_id":"Chris Kelly","object_id":"32d79cfd-b6f6-102b-a73c-000c29bdb9c5","created_at":"August 18, 2008 @ 04:21 PM","date":"18 AUGUST","note":"I will note too!!"},{"id":"753d3736-becc-102b-baf8-000c29f242f5","priority":"0","creator_id":"Moon","object_id":"32d79cfd-b6f6-102b-a73c-000c29bdb9c5","created_at":"August 18, 2008 @ 04:20 PM","date":"18 AUGUST","note":"One more note of the day!"},{"id":"906d07a4-bc72-102b-ad39-000c29bdb9c5","priority":"0","creator_id":"Moon","object_id":"32d79cfd-b6f6-102b-a73c-000c29bdb9c5","created_at":"August 15, 2008 @ 04:32 PM","date":"15 AUGUST","note":"Moon is good at this"},{"id":"7c7b2c6d-bc72-102b-ad39-000c29bdb9c5","priority":"0","creator_id":"Moon","object_id":"32d79cfd-b6f6-102b-a73c-000c29bdb9c5","created_at":"August 15, 2008 @ 04:31 PM","date":"15 AUGUST","note":"This is a normal notes"},{"id":"76eb582c-bc72-102b-ad39-000c29bdb9c5","priority":"1","creator_id":"Moon","object_id":"32d79cfd-b6f6-102b-a73c-000c29bdb9c5","created_at":"August 15, 2008 @ 04:31 PM","date":"15 AUGUST","note":"This is high!"},{"id":"6c06f918-bc72-102b-ad39-000c29bdb9c5","priority":"2","creator_id":"Moon","object_id":"32d79cfd-b6f6-102b-a73c-000c29bdb9c5","created_at":"August 15, 2008 @ 04:31 PM","date":"15 AUGUST","note":"This account sucks!"}]}]
Here is the Javascript:
var json = eval('(' + request.responseText + ')');
alert(json.length); // Output is 1
alert(json[0].length); // Output is undefined
So, how can I get the count of all array elements inside “Account Name”?
Any possible help / tips will be highly appreciated!
Thank you