I have an Object array. I need to apply contains filter for every property (it has to search for that keyword and return the object if any one of the properties contains entered value). Please let me know how to do contains
search using Jquery/Javascript.
Example:
var itemPrices = [
{ 'custName': 'Mike', 'custid': '1'},
{ 'custName': 'secondMike', 'custid': '2' },
{ 'custName': 'Ben', 'custid': '3' },
{ 'custName': 'dan', 'custid': '4' }
];
So, from the above array, If I search for Mike it has to return the 2 records which contain mike in the custName or if I search for 1 it has to return the customer with id 1. So it has to search each and every property in each object and return the matched object.
It is like more of a general search in the object array.
Thanks