This is the sample JSON object. What is the way to access the second record's list array?
var myPlants = [
{
type: "flowers",
list: [
"rose",
"tulip",
"dandelion"
]
},
{
type: "trees",
list: [
"fir",
"pine",
"birch"
]
}
];
asked Jan 4, 2016 at 9:23
satheesh prabhakaran
871 silver badge9 bronze badges
1 Answer 1
You can access it like this :
myPlants[1].list
answered Jan 4, 2016 at 9:24
Magus
15.1k4 gold badges40 silver badges52 bronze badges
Sign up to request clarification or add additional context in comments.
Comments
lang-js