Angular filter a object by its properties

Little late to answer, but this might help :

If you want to filter on a grandchild (or deeper) of the given object, you can continue to build out your object hierarchy. For example, if you want to filter on ‘thing.properties.title’, you can do the following:

<div ng-repeat="thing in things | filter: { properties: { title: title_filter } }">

You can also filter on multiple properties of an object just by adding them to your filter object:

<div ng-repeat="thing in things | filter: { properties: { title: title_filter, id: id_filter } }">

The syntax of ‘not equals’ is just a little off, try the following:

<div ng-repeat="thing in things | filter: { properties: { title: '!' + title_filter } }">

Leave a Comment