Вот пример с меньшим подмножеством вашего JSON ( live ):
const json = [
{
"ID": 626,
"title": "Harakka",
"url": "https://citynature.eu/fi/kohde/harakka/",
"routes": {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {},
"geometry": {
"type": "LineString",
"coordinates": [
[
24.957525730133057,
60.151828145666684
],
[
24.95747208595276,
60.15161455386026
]
]
}
}
]
}
}
];
const coordinates = json[0].routes.features[0].geometry.coordinates;
let coords = [];
for ( let i = 0; i < coordinates.length; ++i )
{
coords.push( coordinates[i][0], coordinates[i][1] );
}
// console.log("Coordinates: [" + coords + "]");
console.log("Coordinates:");
for ( let i = 0; i < coords.length; ++i )
{
console.log( coords[i] );
}
Вывод:
Coordinates:
24.957525730133057
60.151828145666684
24.95747208595276
60.15161455386026