I’m trying to make a filter on a nested JSON. When I use the default filter:query, it looks at all the propertys in the JSON, I only want to look at a few. This is my JSON:
{
"id":"4",
"user":{
"firstName":"First",
"lastName":"Name",
"address":"address",
etc
}
<ion-item ng-repeat="user in data | filter:{'user.lastName':query}" item="item">
doesn’t work, when I use “id” instead of user.lastName it works fine. Without the ’ ’ it doesn’t work either, and filter:{user:{lastName:query}} doesn’t work either.
Any thoughts ? Thanks in advance