I have to filter based on two values. I am trying with following functionality
JSON data is,
{"homeAddress":"26, New Street, Bangalore",
"officeAddress":"31, Old Office Street, Bangalore"
},{
"homeAddress":"27, Neww Street, Bangalore",
"officeAddress":"30, Old Office Street, Bangalore"
}
var locationFilter = {officeAddress: location};
var locationFilter1 = {homeAddress: location};
filterData = $filter('filter')(data, locationFilter);
filterData = $filter('filter')(data, locationFilter1);
return filterData;
By using above functionality. It have filtered second option only.
So how to filter with the two condition with the above styling and how can i use OR, AND Opeartion in this.
When i filtering For ex: 26 & 31 is filter correctly. But here 27 is not filtering