In Angular, I have an array like this:
$scope.colors =["blue","red","pink","yellow"];
And another object
$scope.cars=[{"brand":"Ford","color":"blue"},{"brand":"Ferrari","color":"red"},{"brand":"Rolls","color":"blue"}];
I would like to do filter, so that
<ul>
<li ng-repeat="n in colors | filter:colorFilter">
</li>
</ul>
The ng-repeat would just display the elements in the $scope.colors that exist as values in the $scope.cars
So, in other words, it would just display blue and red
Thanks in advance!