I need to access the variables inside this array in javascript, i need to be able to change the values of this variables in the code.
var imageLocations = {
album : [ 0, 0, 0, 0, "images/woodstock1970.png" ],
family : [ 0, 0, 0, 0, "images/manuelsilva.png" ],
wedding : [ 0, 0, 0, 0, "images/wedding.png" ],
travels : [ 0, 0, 0, 0, "images/benidorm1984.png" ]
};
i have a for each in the code and for each iteration of the loop i want to be able to change the 0's to other values.
Here is a more concrete example where i have the actual loop and what i am trying to do.
for ( var img in imageLocations) {
imageLocations[img].???? = something;
}
what would i put in the ??? if i want to replace one of the 0's inside of every index of the imagelocations.