I'm using AngularJS and I've made a $resource call to fetch a single value (e.g. the fetch gets me 14).
The following is in my controller:
var MaxCount = $resource('/maxquestion/fetch', null,
{
getMaxQuestionCount: {method: 'GET', isArray: false}
});
$scope.maxQuestionCount = MaxCount.getMaxQuestionCount();
Now I'm trying to use $scope.maxQuestionCount in the controller, doing $scope.maxQuestionCount[0] gives me 1 and $scope.maxQuestionCount[1] gives me 4
console.log($scope.maxQuestionCount) me [object Object]
console.dir($scope.maxQuestionCount) me There are no child objects
I'm confused. How to access the value 14?