title: SQL style JOIN on JSON data
body: <p>Is there any way efficiently to join JSON data? Suppose we have two JSON datasets:</p>
  
  <pre><code>{"COLORS":[[1,red],[2,yellow],[3,orange]]}
  
  {"FRUITS":[[1,apple],[2,banana],[3,orange]]}
  </code></pre>
  
  <p>And I want to turn this into the following client side:</p>
  
  <pre><code>{"NEW_FRUITS":[[1,apple,red],[2,banana,yellow],[3,orange,orange]]}
  </code></pre>
  
  <p>Keep in mind there will be thousands of records here with much more complex data structures. jQuery and vanilla javascript are both fine. Also keep in mind that there may be colors without fruits and fruits without colors.</p>
  
  <p>NOTE: For the sake of simplicity, let's say that the two datasets are both in the same order, but the second dataset may have gaps.</p>