title: Passing in the key and returning the object javascript
body: <p>With a JSON array structured like this one,</p>
  <pre><code>&quot;object1&quot;: {
    &quot;key1&quot;: &quot;value1&quot;
    &quot;key2&quot;: &quot;value2&quot;
  }
  &quot;object2&quot;: {
    &quot;key3&quot;: null
    &quot;key4&quot;: null
  }
  }
  </code></pre>
  <p>Could I pass in the key eg. key3 and get returned the object it is part of eg. object2?</p>
  <p>I know this would be possible with a for loop, but I have a lot of keys so I am wondering if there is another way.</p>