I\'ve got the following json data returned from a service request:
{
\"entries\": [{
\"id\": 2081,
\"name\": \"BM\",
\"niceName\": \"
It looks like you have a problem with the structure of the data in your scope. Your example JSON shows an object with an entries
property and a count
property. You then put that whole object in your scope as entries
. This means you'd need to access the entries as entries.entries
, with the count in entries.count
. Perhaps this controller is closer to what you wanted:
myApp.controller("MyController", ['$scope', '$http', '$log', function($scope, $http, $log){
...
$http.get('https://myServiceURL').success(function(data){
$scope.entries = data.entries;
$scope.count = data.count;
});
}]);