Possible Duplicate:
javascript multidimensional array?
Hi guys I need to create an array that can be accessed like this:
var cssValue = cssArray[element][property][value];
Do you know how I could do this?
Possible Duplicate:
javascript multidimensional array?
Hi guys I need to create an array that can be accessed like this:
var cssValue = cssArray[element][property][value];
Do you know how I could do this?
I would rather create an object instead of an array
var cssObject = {
element : {
property : {
value : "your value"
}
}
}
since it seems that you may have some non-integer keys in your structure (property/value could be strings)
and you get the value with
cssObject["element"]["property"]["value"]
// or cssObject.element.property.value