title: Is there a function which returns true or false when searching for an object in an array of objects?
body: <p>I'm looking for a <strong>good way</strong> to check if an object exist in an array of objects. The intended result is true  when all keys/values are present in the same object in that array.</p>
  
  <p>The answers I found by browsing stackoverflow like <a href="https://stackoverflow.com/questions/7364150/find-object-by-id-in-an-array-of-javascript-objects">Find object by id in an array of JavaScript objects</a> which is using <em>jQuery.grep</em> or <a href="https://stackoverflow.com/questions/12462318/find-a-value-in-an-array-of-objects-in-javascript">Find a value in an array of objects in Javascript</a> return the found object. What I'm looking for is <strong>a boolean result</strong> (not the found object).</p>
  
  <p>I know that I can loop for all array elements and then compare each value....etc</p>
  
  <p>But what I mean is if there is a way to use JS methods like this:</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>var listOfObjecs = [
   {id: 1, name: "Name 1", score: 11},
   {id: 2, name: "Name 2", score: 22},
   {id: 3, name: "Name 3", score: 33},
   {id: 4, name: "Name 4", score: 44},
   {id: 5, name: "Name 5", score: 55},
  ];
  
  var isObjectExist = function(search){
    return listOfObjecs.filter(function(obj){
       if(obj.id===search.id &amp;&amp; obj.name===search.name &amp;&amp; obj.score===search.score){
            return true;
       }
       return false;
    });
  }
  
  console.log( isObjectExist({id: 3, name: "Name 3", score: 33}) );
  //outputs the found object [{id: 3, name: "Name 3", score: 33}]
  
  console.log( isObjectExist({id: 9, name: "Name 3", score: 33}) );
  //outputs an empty object []</code></pre>
  </div>
  </div>
  </p>
  
  <p>This is because:</p>
  
  <blockquote>
    <p>The filter() method creates a new array with all elements that pass
    the test implemented by the provided function.</p>
  </blockquote>
  
  <p>If there is no native JavaScript method (returning true or false) how can update the <code>isObjectExist()</code> function to return true or false?</p>