I am working a piece of code in angular 1.x , where I would like to filter array of key,values.
HTML:
<input type="text" ng-model="cust">
<div ng-repeat="customer in customers| filter :cust['name']">
{{customer["name"]}}
</div>
JS:
$scope.customers = [
{"name":"Sathish"},
{"name":"Ankur"},
{"name":"Bob"},
{"name":"Mike"},
{"name":"chris"},
{"name":"chrom"}
];
Basically I want to filter the array based on name of customer. if I give "ch" in the input text box it should give filter and give chris and chrom.