I have a few arrays:
cl = ["Chile", "15", "83"];
ar = ["Argentinia", "16.5", "90"];
py = ["Paraguay", "19", "81.5"];
route = ["cl;ar", "ar;py"];
Is it possible to loop through one array and get the specific values from the other arrays? I've tried this which didn't work:
$.each(route, function(index,value) {
place = v.split(';');
start = place[0];
end = place[1];
console.log('from '+start[0]+' to '+end[0]);
});
The log should display: "from Chile to Argentinia", "from Argentinia to Paraguay"
but it writes just "from c to a", "from a to p".
What did I wrong, how can I read the values from the other arrays?