So, and as is shown in the attached image, I have two objects, addedBack
and Comments
. What I want to do is overwrite the array of comments in addedBack
, with the array comments in Comments
.
I attempted:
const tempVal = Object.assign(addedBack, Comments)
But the value of tempVal
just contained addedBack
, without merging Comments
into it.
How do I do this?