Retrieving data from enumerated JSON sub arrays in Javascript without getJSON
Posted
by Archie Ec
on Stack Overflow
See other posts from Stack Overflow
or by Archie Ec
Published on 2010-04-23T04:32:03Z
Indexed on
2010/04/23
4:33 UTC
Read the original article
Hit count: 319
I'm new to JSON and ajax, but i'm trying to access data in an array where the items are enumerated in a sub array within another sub array. So, I can access without issues
data.items[0].details.specs.name
data.items[0].details.specs.id
etc
But I run into problems with I try to access something like
data.items[0].details.specs[1].name
data.items[0].details.specs[1].id
data.items[0].details.specs[2].name
data.items[0].details.specs[2].id
etc
Can anyone point me in the right direction on how to access this second aspect? Thanks.
© Stack Overflow or respective owner