const map1 = Immutable.Map({ a: { x: 1, z: 1, y: 1, values: [1, 2, 3] } });
const map2 = Immutable.Map({ a: { x: 2, values: [4, 5, 6] } });
const map3 = map1.mergeDeep(map2)
// Output I want is:
// { a: { x: 2, z: 1, y: 1 values: [4, 5, 6] } }
Let's say I have two maps. One of the maps is a partial object of the other, doesn't necessarily contain all the same properties. I want to merge them, including the nested objects, but not merge the arrays. So as you can see above, it's updated the properties that exist in both maps, kept the old properties that don't exist in the new second map, and only used the latest map array rather than merging them into [1,2,3,4,5,6]. How can I do this?