title: Get top three objects by object property in array
body: <p>I have an array of objects with object properties "vote_average" and "file_path", I'm trying to find three objects that have the highest "vote_average" value, I still need the "file_path" property</p>
  
  <p>I can find the single highest object using the code below, however I'm trying to find the 1st, 2nd and 3rd objects with the highest property value of "vote_average"</p>
  
  <pre><code>var fullFilmImages = data.images.backdrops;
  
  var highestRatedImage = Math.max.apply(Math,fullFilmImages.map(function(img){
      return img.vote_average;}
  ))
  
  var highestRatedImageOBJ = fullFilmImages.find(function(img){
      return img.vote_average == highestRatedImage; }
  )
  
  alert(JSON.stringify(highestRatedImageOBJ));
  </code></pre>
  
  <p>I have tried the .map method however I need the objects and not just the property value because the objects also contain another a property called "file_path" that I need</p>
  
  <pre><code>let filmImageRatings = fullFilmImages.map(allFilmImages =&gt; 
  allFilmImages.vote_average).slice(0,3);
  </code></pre>