Filter array of objects on all properties value
<p>I am really surprised I haven't been able to find anything related to my question. I am looking for a fast way to filter my array of objects based on a user text input.</p>

<p>Assume I have this array:</p>

<pre><code>let data = [{
  "id": 1,
  "first_name": "Jean",
  "last_name": "Owens",
  "email": "jowens0@google.ru",
  "gender": "Female"
}, {
  "id": 2,
  "first_name": "Marie",
  "last_name": "Morris",
  "email": "mmorris1@engadget.com",
  "gender": "Female"
}, {
  "id": 3,
  "first_name": "Larry",
  "last_name": "Wallace",
  "email": "lwallace2@example.com",
  "gender": "Male"
}];
</code></pre>

<p>User writes "s", the expected result would be: </p>

<pre><code>let result = [{
  "id": 1,
  "first_name": "Jean",
  "last_name": "Owens",
  "email": "jowens0@google.ru",
  "gender": "Female"
}, {
  "id": 2,
  "first_name": "Marie",
  "last_name": "Morris",
  "email": "mmorris1@engadget.com",
  "gender": "Female"
}]
</code></pre>

<p>I could use the filter function in such a way:</p>

<pre><code>let = searchText = "s";
    let result = data.filter(object=&gt;{
      for (var property in object) {
        if (object.hasOwnProperty(property)) {
          return object[property].toString().toLowerCase().indexOf(searchText) !== -1;
        }
      }
    });
</code></pre>

<p>So I am wondering if there are better alternatives to this solution?</p>

<p>--Here is a working <a href="https://jsfiddle.net/d8mhtjs5/5/" rel="noreferrer" title="JsFiddle">JsFiddle</a> thanks to KoolShams</p>

<p>--<a href="https://plnkr.co/edit/i1it9PZ7WMzwpsopT7pS?p=preview" rel="noreferrer">Plunker</a> for benchmark purposes (tested with 2k data)</p>