var collectionsd
返回類似收集變量中的所有值的JavaScript控制檯日誌
[5.2140564, 52.3705452]
[5.2180339, 52.3363171]
[5.2424313, 52.3595914]
[5.2739435, 52.388464]
[5.2368864, 52.336711]
在前端只顯示[5.2368864, 52.336711]
我需要下面喜歡在JavaScript中。
var collectionsd = [[5.2140564, 52.3705452],[5.2180339, 52.3363171],[5.2424313, 52.3595914],[5.2739435, 52.388464],[5.2368864, 52.336711]];
更新:-1
this.variables = JSON.parse(jso);
this.passing=[];
zc.passing.push(zc.variables['geo']);
console.log(zc.passing);
ouptut:-
[5.2140564, 52.3705452]
[5.2180339, 52.3363171]
[5.2424313, 52.3595914]
[5.2739435, 52.388464]
[5.2368864, 52.336711]
我需要做的ZC。在單個數組中傳遞值。
什麼是你的代碼看起來像那麼遠? –
var collectionsd = zc.variables ['geo']; – JohnS
它返回新的對象。需要返回與數組相同的對象 – JohnS