I believe what I am trying to achieve is similar to an HTTP Patch or deep extend function, but I want to achieve it with rxjs. Say I have the following objects:
const arr1 = {
obj1: { a: 'dog', b: 'cat', c: 'bird' },
obj2: { a: 'boy', b: 'girl', c: 'guitar' },
obj3: { a: '1', b: '2', c: '3' }
}
const arr2 = {
obj1: { a: 'wolf', b: 'lion', c: 'hawk', z: 'bear' },
obj2: { c: 'car'}
}
I then want to use rxjs in order to get the following output:
const output = {
obj1: { a: 'wolf', b: 'lion', c: 'hawk', z: 'bear' },
obj2: { a: 'boy', b: 'girl', c: 'car' },
obj3: { a: '1', b: '2', c: '3' }
}
Is there an efficient way to achieve this?