The expression can be a map of property-to-filters: where each property in the object maps to a corresponding property within the result set.
$filter('filter')(employees, {name:"Joe"});
Live Demo
Using A Custom Function
If your data is more complex, and you need more advanced filtering, then you can simply pass in a custom predicate function to evaluate whether or not an item should be filtered.
The input of the function takes each item of the array as an argument, and is expected to return false
if the item should be excluded from the result set.
var people = [{date:new Date(), details:{
name: 'Josh',
age: 32
}}, {date:new Date(), details:{
name: 'Jonny',
age: 34
}}, {date:new Date(), details:{
name: 'Blake',
age: 28
}}, {date:new Date(), details:{
name: 'David',
age: 35
}}];
$scope.filteredPeople = $filter('filter')(people, function(person){
return /^Jo.*/g.test(person.details.name);
});