array removing duplicate having key value pair in javascript
<p>I have an array having key value pair like this:</p>

<pre><code>[3, "Rey"],[3,"Rhio"],[4,"Rey"],[1,"derter"];
</code></pre>

<p>I want to get an resulting array so that if the value is same , then key having maximum value would be taken.like below </p>

<pre><code>[3,"Rhio"],[4,"Rey"],[1,"derter"];
</code></pre>
