SOURCE

var data = {
"type": "FeatureCollection",
"name": "撒点",
"crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } },
"features": [
{ "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [118.86258162,32.13225176] } },
{ "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [118.86261227,32.13268509] } },
{ "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [118.86268621,32.13309912] } },
{ "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [118.86269228,32.13317834] } },
{ "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [118.86270178,32.13329620] } },
{ "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [118.86271245,32.13343187] } },
{ "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [118.86282754,32.13359554] } },
{ "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [118.86324184,32.13366520] } },
{ "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [118.86296699,32.13341993] } },
{ "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [118.86277205,32.13315678] } },
{ "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [118.86302022,32.13337845] } },
{ "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [118.86327515,32.13360322] } },
{ "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [118.86347984,32.13370133] } },
{ "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [118.86381676,32.13374382] } },
{ "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [118.86424798,32.13381099] } },
{ "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [118.86421437,32.13409808] } },
{ "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [118.86368714,32.13404609] } },
{ "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [118.86332699,32.13401515] } },
{ "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [118.86317301,32.13396588] } },
{ "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [118.86279884,32.13389683] } },
{ "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [118.86272756,32.13394487] } },
{ "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [118.86271132,32.13430420] } },
{ "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [118.86295596,32.13420664] } },
{ "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [118.86269902,32.13448412] } },
{ "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [118.86268398,32.13474269] } },
{ "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [118.86265969,32.13518322] } },
{ "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [118.86262036,32.13590660] } },
{ "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [118.86223832,32.13596171] } },
{ "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [118.86225211,32.13570324] } },
{ "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [118.86227245,32.13533306] } },
{ "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [118.86229741,32.13485203] } },
{ "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [118.86231416,32.13452923] } },
{ "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [118.86219710,32.13433564] } },
{ "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [118.86201582,32.13413246] } },
{ "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [118.86187550,32.13397517] } },
{ "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [118.86156470,32.13360939] } },
{ "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [118.86175730,32.13366779] } },
{ "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [118.86221123,32.13377838] } },
{ "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [118.86234541,32.13381614] } },
{ "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [118.86234882,32.13387433] } },
{ "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [118.86232449,32.13430796] } },
{ "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [118.86209012,32.13404088] } },
{ "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [118.86118271,32.13348623] } },
{ "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [118.86068355,32.13332059] } },
{ "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [118.86016514,32.13315107] } },
{ "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [118.85943235,32.13291387] } },
{ "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [118.85990881,32.13275200] } },
{ "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [118.86025840,32.13286609] } },
{ "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [118.86056279,32.13296476] } },
{ "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [118.86136584,32.13322608] } },
{ "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [118.86199450,32.13340840] } },
{ "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [118.86222262,32.13346992] } },
{ "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [118.86230375,32.13346873] } },
{ "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [118.86232622,32.13337023] } },
{ "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [118.86231853,32.13318044] } },
{ "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [118.86216718,32.13329031] } },
{ "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [118.86200846,32.13331700] } },
{ "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [118.86223091,32.13316427] } },
{ "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [118.86233275,32.13297317] } },
{ "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [118.86232168,32.13283983] } },
{ "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [118.86229286,32.13247399] } },
{ "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [118.86227617,32.13214265] } }
]
}

var fea = data.features;

var arr = [];

for (let i = 0; i < fea.length; i++) {
  let arrObj = {
    x: 0,
    y: 0,
    order:0,
  };
   arrObj.x = fea[i].geometry.coordinates[0];
   arrObj.y = fea[i].geometry.coordinates[1];
   arrObj.order = i+1;
   arr.push(arrObj);
}

console.log(arr)
console 命令行工具 X clear

                    
>
console