I\'m running a simple ng-repeat over a JSON file and want to get category names. There are about 100 objects, each belonging to a category - but there are only
ng-repeat
If you want to list categories, I think you should explicitly state your intention in the view.
{{category}}
in the controller:
$scope.categories = $scope.places.reduce(function(sum, place) { if (sum.indexOf( place.category ) < 0) sum.push( place.category ); return sum; }, []);