Reputation: 19
Lets say I have a URL that brings out this JSON object.
How do I fetch Albertson
?
{
"ancestor" : [
{
"father" : [
{
"long_name" : "Albertson",
"short_name" : "Roger",
"types" : [ "surname" ]
}
]
}
],
}
Is it ancestor[0][0].long_name
?
Upvotes: 1
Views: 53
Reputation: 7711
You can fetch the data using
object.ancestor[0].father[0].long_name
You can also refer: http://www.json.com/#object-with-nested-array-and-object
Upvotes: 1