I have a dynamically loaded object for which the print of JSON.stringify()
in the console looks like this:
var data = [
{
"attributes": {
"OBJECTID": 1046
},
"geometry": {
"x": -9814734.1764,
"y": 5130578.545900002
}
},
{
"attributes": {
"OBJECTID": 1051
},
"geometry": {
"x": -9814335.3286,
"y": 5130497.9344
}
},
{
"attributes": {
"OBJECTID": 1052
},
"geometry": {
"x": -9814639.1784,
"y": 5130583.1822
}
},
{
"attributes": {
"OBJECTID": 1053
},
"geometry": {
"x": -9814496.7964,
"y": 5130560.822300002
}
}
];
How can I apply .toFixed(2)
function to each of X
and Y
in geometry
nodes on the fly?