title: Get single object from array using JavaScript functions
body: <p>I have this array of objects:</p>
  
  <pre><code>var frequencies = [{id:124,name:'qqq'}, 
                    {id:589,name:'www'}, 
                    {id:45,name:'eee'},
                    {id:567,name:'rrr'}];
  </code></pre>
  
  <p>I need to get an object from the array above by the <code>id</code> value.</p>
  
  <p>For example I need to get the object with id = 45. </p>
  
  <p>I tried this:</p>
  
  <pre><code>var t = frequencies.map(function (obj) { return obj.id==45; });
  </code></pre>
  
  <p>But I didn't get the desired object.</p>
  
  <p>How can I implement it using JavaScript prototype functions?</p>