title: check if dictionary object in array contains certain value in javascript
body: <p>I have an array, like so:</p>
  
  <pre><code> const myArray = [{key1: "value1", key2: "value2"}, {key1: "value4", key2: "value8"},
    {key1: "value1", key2: "value3"}, {key1: "value1", key2: "value32"}]
  </code></pre>
  
  <p>I need to loop through the array, and see if ANY item in the array has a certain value. I have looked through other questions and most loop through and create variables, however I am not allowed to use var (ES6 something, I'm a js noob  and am not sure, just was told to never use var, always const). Basically I need something like this:</p>
  
  <pre><code>if (myArray.contains(object where key1=="value2")) {
    // do something
  }
  </code></pre>
  
  <p>I would like for the function to return true/false as well, not the object itself.</p>
  
  <p>thanks</p>