1

我如何转换

var blockobject= new Array();
blockobject[blockobject.length]={area:"1",markerid:[{position:"(34.689703991083334, 135.50275325775146)",title:"sometitle"},{position:"24.689703991083334, 125.50275325775146",title:"sometitle"}]};

变成我试过的字符串

var saveobject = JSON.stringify(blockobject,["markerid","area"]);
alert(saveobject);

它返回

      [{"markerid":[{},{}],"area":"1"}]

我正在使用 json2.js

4

0 回答 0