In my AngularJs Application, I have a collection of customers.
var customers = [
{
"Name": "Alfreds Futterkiste",
"City": "Berlin",
"Country": "Germany"
},
{
"Name": "Ana Trujillo Emparedados y helados",
"City": "México D.F.",
"Country": "Mexico"
}
];
I am trying to filter these customers based on multiple columns. The code I used below did not yield the desired results.
$scope.customers = (
$filter('filter')(customers, {
Name: $scope.criteria.searchtext,
City: $scope.criteria.searchtext
})
);
UPDATE
Can someone guide me on converting the above syntax to use 'OR' logic? Please refer to this CodePen Sample for illustration.