title: Analog to SQL 'JOIN' for Javascript objects?
body: <p>What's a pragmatic analog to SQL 'JOIN' for tables represented as arrays of Javascript objects?   Javascript <code>Array.join</code> and D3.js 'd3.merge` are not the same concept.</p>
  
  <p>E.g. <code>SELECT * FROM authors LEFT JOIN books ON authors.id = books.author_id</code>?  </p>
  
  <p>First table:</p>
  
  <pre><code>var authors = 
  [  { id: 1, name: 'adam'},
     { id: 2, name: 'bob'},
     { id: 3, name: 'charlie'}, ...
  ]
  </code></pre>
  
  <p>Second table:</p>
  
  <pre><code>var books = 
  [  { author_id: 1, title: 'Coloring for beginners'}, 
     { author_id: 1, title: 'Advanced coloring'}, 
     { author_id: 2, title: '50 Hikes in New England'},
     { author_id: 2, title: '50 Hikes in Illinois'},
     { author_id: 3, title: 'String Theory for Dummies'}, ...
  ]
  </code></pre>
  
  <p>The tables are loaded from CSV using D3.js <code>d3.csv()</code>, so have D3.js already, open to other libs but generally prefer coding directly if not too far out of the way.</p>
  
  <p>I see <a href="https://stackoverflow.com/questions/4740806/native-way-to-merge-objects-in-javascript">Native way to merge objects in Javascript</a> which uses RethinkDB, which seems over the top for this, but this is the idea.</p>