我有一个非常简单的JSON数组(请关注"points.bean.pointsBase"对象):
var mydata =
{"list":
[
{"points.bean.pointsBase":
[
{"time": 2000, "caption":"caption text", duration: 5000},
{"time": 6000, "caption":"caption text", duration: 3000}
]
}
]
};
// Usually we make smth like this to get the value:
var smth = mydata.list[0].points.bean.pointsBase[0].time;
alert(smth); // should display 2000
Run Code Online (Sandbox Code Playgroud)
但不幸的是,它确实没有显示任何内容.
当我将"points.bean.pointsBase"改为smth而没有点名时 - 一切正常!
但是,如果没有圆点,我无法将此名称更改为其他任何内容,但我需要获取值?!
有没有选择来获得它?