I thought I solved my problem using the for (var key in arr) suggested here but this causes trouble in IE. Now I am back to square one.
var myVariable = [];
myVariable['option-1'] = 'something';
myVariable['option-2'] = 'something else';
$.each(myVariable, function(index, value) {
alert(index + ': ' + value);
});
It doesn't work. Nothing shows. Can someone edit it to make it work?
Object({}) ( not anArray([]) ) and afor ... inloop