I have nested arrays that contain objects, and I am experiencing a really strange problem. The object value I am trying to retrieve is returning "undefined" even though I can see it in the Firefox debugger.
This is my code:
angular.forEach(pages, function(page, pageIndex){
angular.forEach(page, function(controlObject,controlObjectIndex){
/* GET THE KEY OF THE OBJECT */
var keys = [];
for(var k in controlObject) keys.push(k);
console.log("CONTROL: "+keys+" VALUE: "+controlObject.value); // THIS OUTPUTS: CONTROL: 01 VALUE: undefined
});
});
I have search for other people experiencing this problem, and all the quesiton I could found were caused by an AJAX request not completing before trying to access the object, but I do not have any AJAX requests in my code.
I would really appreciate any suggestions! TIA!