I have an array:
var fileMetaData = [];
In a loop I want to push things to the array:
$('#gallery-manager-add-form .galleryImage').each(function(){
fileMetaData.push(myTestArray);
});
For testing myTestArray is:
var myTestArray = new Array(2);
myTestArray['a'] = 'foo';
myTestArray['b'] = 'bar';
The problem is, when I get the contents of the array, it's just a comma (,).
Any ideas where I am going wrong?
dystroypointed out, you should be using Objects not Arrays.