I have this object:
[
{
"latitude": "113.232160114",
"longitude": "-1.786978559"
},
{
"latitude": "113.211955085",
"longitude": "-1.790031776"
}
]
is there any possible way to make it look like this using JavaScript?
[
[
113.232160114,
-1.786978559
],
[
113.211955085,
-1.790031776
]
]
[[113.232160114, -1.786978559], [113.211955085, -1.790031776]](with square brackets, indicating an array)?ais your initial array of objects, it's as simple asa.map(Object.values)