I want to update (replace) the objects in my array with the objects in another array. Each object has the same structure. e.g.
var origArr = [
Here's a solution using underscore:
var result = _.map(origArr, function(orig){ return _.extend(orig, _.findWhere(updatingArr, {name: orig.name})); });