Im trying to get the size of an array but every time the console say me undefined and don't know why.
.success(function (data) {
console.log('Random-Suffix:' + suffix);
$scope.builds = new X2JS().xml_str2json(data);
var size = $scope.builds.length;
console.log('Size: ' + size);
$timeout(function () {
$scope.exampleLiveDataChange();
}, 3000);
})
console.log($scope.builds)?console.log(typeof($scope.builds))you will most probably see that$scope.buildsis not an array ! You may then need to output it and look for your array inside it;