{
"kml": {
"$": {
"xmlns": "http://www.opengis.net/kml/2.2"
},
"Document": [
{
"Folder": [
{
"Placemark": [
{
"Point": [
{
"coordinates": [
"11.0,50.0,0.0"
我如何获得坐标内容。我执行以下操作但收到错误:
var jsonObj = JSON.parse(json);
console.log(jsonObj.Document[0][0][0][0]);
答案 0 :(得分:0)
您也应该添加属性,而不仅仅是数组索引:
jsonObj.kml.Document[0].Folder[0].Placemark[0].Point[0].coordinates[0]