title: filter object by key values
body: <p>I have an array of objects lets say:</p>
  
  <pre><code>var ob=[
    {
      name:'john', 
      surname:'fox'
    }, {
      name:'jill',
      surname:'hog'
    }
  ];
  </code></pre>
  
  <p>I'm implementing search on a website, where i can input either name or surname, and it should filter new array by objects that contain input value.<br>
  So if my input is 'fox'   it will filter out  the object that contains key value 'fox'</p>
  
  <p>my simple idea was :</p>
  
  <pre><code>ob.filter(item=&gt;{ return item.name.includes(searchterm) || 
  item.surname.includes(searchterm)}
  </code></pre>
  
  <p>But i guess there are better ways, in case key names change.</p>