title: Filtering a nested array - javascript
body: <p>I have a nested array and each array has a string and an integer, the strings in some of the array are the same but i want to filter the array so that it only contains nested arrays with unique names and that have the highest values.  Here's an example of what i have and what i want:</p>
  
  <pre><code>[['a', 1],['a', 2],['a', 3],['b',2],['b',5]]
  </code></pre>
  
  <p>what i want to do is filter so that it contains this:</p>
  
  <pre><code>[['a', 3],['b', 5]]
  </code></pre>
  
  <p>I originally tried doing this with a for loop and an if statement, then a for loop and a while statement, when i looked at filtering but i'm not sure how to implement it where it will keep the string with the highest value, please help!!!!</p>