Is there a function, either in Javascript or Lodash, in which I can "update" one object with values from another object, but without adding new keys?
var foo = { 'a': 0, 'b': 1 }
var bar = { 'b': 2, 'c': 3 }
Something like update(foo, bar), overwriting ("updating") any existing keys, but not adding non-existing keys:
{ 'a': 0, 'b': 2 }
There's almost certainly a similar question like this on StackOverflow, but I've not been able to find it.