There is a small problem
I need to compare two objects, and based on the same keys in these objects pass values from second object to the original object.
Original object
{
content: "Old Value",
height: 200,
id: "15a2d286-d123-1cf0-4e40-b043b055a49f",
type: "location",
units: "some unit value",
width: 200,
}
Second object
{
units: "some unit value",
content: "New Value"
}
Keys is not necessary to check for compliance
The output will be something like that
{
content: "New Value", // changed value
height: 200,
id: "15a2d286-d123-1cf0-4e40-b043b055a49f",
type: "location",
units: "some unit value", // changed value
width: 200,
}
Is there any elegant solution to this problem with Lodash or Underscore?