title: Filter array of objects whose any properties contains a value
body: <p>I'm wondering what is the cleanest way, better way to filter an array of objects depending on a <code>string keyword</code>. The search has to be made in any properties of the object.</p>
  <p>When I type <code>lea</code> I want to go trough all the objects and all their properties to return the objects that contain <code>lea</code></p>
  <p>When I type <code>italy</code> I want to go trough all the objects and all their properties to return the objects that contain <code>italy</code>.</p>
  <p>I know there are lot of solutions but so far I just saw some for which you need to specify the property you want to match.</p>
  <p>ES6 and lodash are welcome!</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>  const arrayOfObject = [{
        name: 'Paul',
        country: 'Canada',
      }, {
        name: 'Lea',
        country: 'Italy',
      }, {
        name: 'John',
        country: 'Italy',
      }, ];
  
      filterByValue(arrayOfObject, 'lea')   // =&gt; [{name: 'Lea',country: 'Italy'}]
      filterByValue(arrayOfObject, 'ita')   // =&gt; [{name: 'Lea',country: 'Italy'}, {name: 'John',country: 'Italy'}]</code></pre>
  </div>
  </div>
  </p>