I have in angular nested object like this. is there way how to filter it for nested property
search.l
Updated "Words Like Jared" answer to use regular expressions to check if it contains the searchterm. This way starts filtering when you type in 1 number so you don't have to match the entire word
JSfiddle
angular.forEach(shop.locations, function (location) {
if (checknum(location.city_id)) {
found = true;
}
});
function checknum(num){
var regx = new RegExp($scope.selectedCityId);
return regx.test(num);
};