title: Using _.uniqBy to keep an object that has a larger value of a key in lodash
body: <p><a href="https://jsfiddle.net/fr9qtzm2/13" rel="nofollow noreferrer">JSFiddle Example</a></p>
  
  <pre><code>let obj = [{'vote':999,'name':'D'},
             {'vote':341,'name':'A'},
             {'vote':789,'name':'A'},
             {'vote':555,'name':'B'}]
  
  let result = _.uniqBy(obj,(item)=&gt;{
    return item.name
  })
  result = _.orderBy(result,(item)=&gt;{
    return item.mid
  },['desc'])
  </code></pre>
  
  <p>I want to remove the duplicated By name. In this case I want<code>{'vote':341,'name':'A'}</code> removed because it has fewer votes than the other one.
  Is there a way to compare the vote values during <code>_.uniqBy</code>?</p>
  
  <p>I have also tried running <code>_.orderBy</code> first before <code>_.uniqBy</code> but there is no guarantee that <code>{'vote':341,'name':'A'}</code> is going to be the one removed.</p>
  
  <p><a href="https://jsfiddle.net/fr9qtzm2/14/" rel="nofollow noreferrer">Example</a></p>
  
  <p>I'm using lodash 4.3</p>