My array of objects is generated through JSON
and it has a specific structure:
{"uid":1,"first_name":"Name","last_name":"Surname","sex":1},
{"uid":2,"first_name":"Name","last_name":"Surname","sex":2},
{"uid":3,"first_name":"Name","last_name":"Surname","deactivated":"deleted","sex":1}
I assign them to $scope.friends
and display them using ng-repeat="friend in friends"
.
I want to filter out any friends that have the key deactivated
in their object.
Can you help me achieve this?