title: Javascript - get the value of a property within a specific JSON array element by its key
body: <p>I have a JSON structure like this:</p>
  
  <pre><code>{
  map: [
        {"key1":"valueA1", "key2":"valueA2", "key3":"valueA3"},
        {"key1":"valueB1", "key2":"valueB2", "key3":"valueB3"},
        {"key1":"valueC1", "key2":"valueC2", "key3":"valueC3"},
         .... etc
       ]
  }
  </code></pre>
  
  <p>... which I load into my javascript app to become an object via JSON.parse().</p>
  
  <p>I want to retrieve (say) the value of key3 from the element of the object array where key2='valueB2'.</p>
  
  <p>I can do it by looping through, but wondered if there was a more elegant (e.g. single line and more efficient) way of doing this, without having to know the index number for the array element?</p>
  
  <p>I've google loads of sites, to little avail.  Or would I be better simplifying/removing the array in favour of a simple list of objects?</p>
  
  <p>Thanks.</p>