-2
我使用这个:JSON错误
var title = dataset[key]['title'];
console.log(title);
输出上的console.log:
Object {0: "Here is the title"}
所以,当我这样做:
var title = dataset[key]['title'][0];
console.log(title);
输出上的console.log:
"Here is the title"
Uncaught TypeError: Cannot read property '0' of undefined
它适用于我。没有未定义。检查你的代码。什么是
? –
哎呦......为
–
我也试过[0]和['0'] –