I'm still new to Javascript and trying to build a small project, I've done some research online about manipulating objects, but I mostly found forums about filtering arrays and not objects.
I have 2 objects:
let Object1 = {item1: {}, item2: {}, item3: {}}
let Object2 = {item4: {}, item5: {}}
const removeItem = 'item1'
I need to apply the following on these objects:
Remove the item in "removeItem" from Object1 and return a new object:
Object1 = {item2: {}, item3: {}}
Copy item4 from Object2 to Object1 and return a new object:
Object1 = {item2:(), item3: {}, item4: {}}