Hey I got this object inside polygons.js:
var polygons = [
{
"_id" : "12345",
"geometry" : {
"coordinates" : [[
[9.123553, 48.71568],
[ 9.119548, 48.71526 ]
]]
}
},
{
"_id" : "67890",
"geometry" : {
"coordinates" : [[
[ 9.090445, 48.715736 ],
[ 9.089583, 48.715687 ]
]]
}
}
]
I want to loop through this array in order to get a result like this:
[
{
"_id" : "12345",
"coordinates" : [[
[9.123553, 48.71568],
[ 9.119548, 48.71526 ]
]]
},
{
"_id" : "67890",
"coordinates" : [[
[ 9.090445, 48.715736 ],
[ 9.089583, 48.715687 ]
]]
}
]
Does anyone have an idea how to solve it? Thank you very much in regard!
Array.map.