Create jsonmerge.js
Create jsonmerge.js

Simple way to merge a couple of arrays containing JSON

var one = [{id:0, name: "chris"}, {id: 1, name: "leilani"}];
var two = [{id: 0, role: "dad"}, { id: 1, role: "mom"}]; 

var inner = jsonmerge.InnerJoin( one, two, function ( left, right )
{
      return ( left.id === right.id );
} );

returns [{id: 0, name: "chris", role: "dad"}, {id:0, name="leilani", role="mom"}]
collanders/jsonmerge