title: get object from array by key name
body: <p>I want to get an object from an array by its key name. </p>
  
  <p>Array: </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>let input = [
      id1: {},
      id2: {},
      id3: {},
  ]
  
  console.log(input);</code></pre>
  </div>
  </div>
  </p>
  
  <p>And I only want the object with the key <code>id2</code>. How can I filter the object from the array?</p>