I have a list of data from a json with a drop down filter. The list is grouped by with its name. But some data is repeating. I don"t want to list repeated data. How to do that. Please see the below link. Please help me.
http://plnkr.co/edit/zFUkWkYde9gpmeKZ9fP1?p=preview
angular.forEach($scope.locationList, function(item){
var locations = $scope.loacationByCategory[item.field_location_category[0]];
if(locations){
locations.push(item);
}else{
$scope.loacationByCategory[item.field_location_category[0]] = [item];
$scope.categories.push(item.field_location_category[0]);
}
});
Thank you.