Here are two arrays of objects that I have:
var x = [{id:456, name:'falcon'},
{id:751, name:'gagarin'},
{id:56, name:'galileo'}]
var y = [{id:751, weight:6700},
{id:456, weight:2958},
{id:56, weight:7200}]
With the help of underscorejs, how can we merge array x with array y to create a new array z which includes the weight property from array y where the id matches:
var z = [{id:456, name:'falcon', weight:2958},
{id:751, name:'gagarin', weight:6700},
{id:56, name:'galileo', weight:7200}]