title: Merge contents of a hash containing array of arrays in jQuery/JS for Highcharts
body: <p>I have two hashes:</p>
  
  <pre><code>var hash1 = { name: "hello1", data: [ [1, 1], [2, 1] ] };
  var hash2 = { name: "hello2", data: [ [3, 1], [4, 2] ] };
  var hash3 = {};
  </code></pre>
  
  <p>What I would like is to combine the hash into a new one (hash3) in such a way, as to only merge the array of arrays for the data object/key. The result should ideally be sorted based on the first element of the array (which really is a time value):</p>
  
  <pre><code>hash3 = { name: hello1, data: [ [1, 1], [2, 1], [3, 1], [4, 2] ] };
  </code></pre>
  
  <p>Prefer jQuery. But JavaScript and/or jQuery would both work.</p>
  
  <p>Also, if someone could recommend a good book on manipulating data structures in JavaScript, I would appreciate it.</p>
  
  <p>PS: All that manipulation is basically intended to combine two series into one for the Highcharts graphing library.</p>