I am stepping through the AngularJS code below in the debugger. It says testingWhat is of type Array[1], but when I try to access it using [0], testingArray becomes of type undefined, with no content. Why?
myApp.controller('SomeController', function ($scope, MyData) {
    $scope.dataForTheTree = MyData.collection;
    var testingWhat = MyData.collection;
    var testingArray = MyData.collection[0];
    for(var x in testingWhat) {
        console.log("Loading data into tree: " + x);
    }
});
 
     
    