I have two simple objects. After merging these two objects, I would like to change the merged object's values by changing individual objects' values. Is it possible? If so, How can I do that?
For example:
const objA = {first: 'foo'};
const objB = {second: 'bar'};
const merged = {...objA, ...objB}; // {first: 'foo', second: 'bar'}
objA.first = 'something';
// what I need merged: {first: 'something', second: 'bar'}