I want to create a multidimensional array and loop through it. I know it's possible because I've read about it, but I still can't figure why this does not work...
var bundeslan = [ ["city1"][19161], ["city2"][19162], ["city3"][19162] ]; console.log(bundeslan); I want to associate each city with a number and use that number to identify a div.
My thought was to loop through the array like this...
//Start main loop $.each(bundeslan, function( key, value ) { //Inner loop $.each(key, function(innerKey, innerValue){ alert(innerValue); }); }); But why do I gut like [undefined][undefined][undefined] etc... in console.log(bundeslan)?
{"city1": 19161, "city2": 19162, "city3": 19162}