codecamp

JavaScript 获取JSON数组值

// Setup
var myPlants = [
{ 
type: "flowers",
list: [
"rose",
"tulip",
"dandelion"
]
},
{
type: "trees",
list: [
"fir",
"pine",
"birch"
]
}
];


// Only change code below this line


var secondTree = myPlants[1].list[1]; // Change this line
 JavaScript 获取JSON属性值
JavaScript JSON集合操作
温馨提示
下载编程狮App,免费阅读超1000+编程语言教程
取消
确定