Hello,
I am new to node-red and i have a Json file with multiple arrays:
and i want to iterate them all in a nested loop so i can save the values inside a list.
so far i managed to iterate one array and save the values to a list but i cannot go through multiple arrays for some reason
This is what i have so far:
for (var i=0; i<=data.features[0].geometry.coordinates.length; i++){
for (var j=0; j<=data.features[0].geometry.coordinates[i].length; j++)
spots.push(data.features[0].geometry.coordinates[i][j]);
}
and i get the following error:
TypeError: Cannot read property 'length' of undefined