I have an array of json objects like this:
$scope.data = [{ name: "something something", date: 982528 },
{ x: 1, y: { sub: 2}, prop1: "some string" },
{ a: "b", c: "d", e: "some string" }];
and I'm trying to filter it with:
var filteredData = $filter('filter')($scope.data, "some string");
this way in all the properties of the objectes in the array, angular compares with the search string,
in this example it will return the las two objects,
now, what i need is to pass an array of properties like:
var exclude = ['prop1'];
so the filter will omit to compare those properties in each object, is there an angular filter with this option?
$filter('filter')($scope.data, {e: "some string"});would only return objects wheree === "some string", but would not match this for other properties. see docs.angularjs.org/api/ng/filter/filter