title: Javascript merge 2 arrays and sum same key values
body: <p>I have 2 array:</p>
  
  <pre><code>    var array1 = [[5,10],[6,10],[7,10],[8,10],[9,10]];
      var array2 = [[1,10],[2,10],[3,10],[4,10],[5,40],[6,40]];
  </code></pre>
  
  <p>Want to get 1 merged array with the sum of corresponding keys;</p>
  
  <pre><code>    var array1 = [[1,10],[2,10],[3,10],[4,10],[5,50],[6,50],[7,10],[8,10],[9,10]];
  </code></pre>
  
  <p>Both arrays have unique keys, but the corresponding keys needs to be summed.</p>
  
  <p>I tried loops, concat, etc but can't get the result i need.</p>
  
  <p>anybody done this before?</p>