I have some data which I have pulled from an external file, loaded as strings and split it into arrays. I would like to now utilise this data, I'm unsure if the best way to go about doing this is to just access the parallel arrays or to create objects with 3 different named values.
I attempted to do the former, here is a picture of my data logging to console for reference:
And here is the code I attempted:
for(let i = 0; i < problem.length; i++) {
for(let j = 1; j < problem.length; j++) {
for(let k = 2; k < problem.length; k++) {
id = problem[i];
posX = problem[j];
posY= problem[k];
}
}
}
Where problem is the split string array, this does not work, and I'm quite confused on the best way to manipulate this sort of data, of which i feel is a very important skill and any guidance is appreciated!
If it matters at all I will be 'hoping' to easily call upon the one set of 3 values at a later date to visualise the data.
