OK, I am trying to access an object in a loop for my code to work in every object, unfortunately, my object is located in another object. example:
var object = new Object();
object.insider1 = new Object();
object.insider1.name = "ex";
object.insider1.type = "blah";
object.insider2 = new Object();
object.insider2.name = "Ex2";
object.insider2.type = "blah2";
Now to access it with the loop:
for(var g=0; g<object[object.length]; g++){
//do stuff
}
object[object.length] is being noted as 'undefined' and therefore I can't use it... Is there any way to fix this? Thank you!