JSON解析并考虑对象的等级内[重复]
这个问题已经在这里有一个答案:
- How can I access and process nested objects, arrays or JSON? 22个回答
如果你想获得grades
,只是做student[0].grades
:
fs.readFile("student.json", (err, data) => {
if (err) throw err;
console.log(data.student[0].grades);
});
JSON解析并考虑对象的等级内[重复]
这个问题已经在这里有一个答案:
- How can I access and process nested objects, arrays or JSON? 22个回答
如果你想获得grades
,只是做student[0].grades
:
fs.readFile("student.json", (err, data) => {
if (err) throw err;
console.log(data.student[0].grades);
});
与本文相关的文章
评论列表 (0)
- 暂无评论