我有下一个JSON对象,但无法从中获取经度和纬度。在JavaScript中,每当我尝试我得到undefined错误:来自JSON的元素
{
"response": {
"date_ts": 1352514978,
"raw": {
"profile": "realtime",
"battery": -100,
"battery_state": "unknown"
},
"uuid": "b191d0d4-a967-47c9-b58b-3b491c8247db",
"location": {
"position": {
"altitude": 0,
"speed": -4,
"horizontal_accuracy": 5,
"latitude": 37.785834,
"longitude": -122.406417,
"heading": 0,
"vertical_accuracy": 0
},
"type": "point"
},
"date": "2012-11-09T20:36:18-06:00"
},
"type": "onSuccess",
"source": {}
}
有什么建议吗?
我们展示的代码 – onemach
如何这会导致错误的JavaScript代码? – iMoses