Retrieving data from enumerated JSON sub arrays in Javascript without getJSON
- by Archie Ec
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.