var array1 = {};
array1['one'] = new Array();
array1['one']['data'] = 'some text';
array1['one']['two'] = new Array();
array1['one']['two']['three'] = new Array();
array1['one']['two']['three']['data'] = 'some other text';
$.each(array1, function(key1, value1){
$.each(value1['two']['three'], function(key1, value1){
document.write('test');
}
});
everything works, except it doesnt get to the document.write.
Anyone an idea why?
Note that the Array() replacement is key here with the missing ‘)’
and Another way to write the same thing:(small tweek on the write to reference your object)
And finally, with the deprecated new Object() replacement:
EDIT: some fun with your array, and why you MIGHT have the strings in the object declaration as you have it:
the output the the last is: “test howdy:data:some other text”