var data={}; for(var i=0;i<result.length;i++){ data[(""+result[i].name+"")]=eval("("+result[i].location+")"); }
geoCoord:{'Islands':[113.95, 22.26]}git
geoCoord是一個obj,Islands類型也是obj,[113.95, 22.26]是數組,要將json種取出的數組轉換成對應的格式github
https://github.com/ecomfe/echarts/issues/611json