I am trying to merge the following objects into one but having no luck so far - the structure is as follows in my console.log :
2018-05-11 : {posts: 2} // var posts
2018-05-11 : {notes: 1} // var notes
Once merged I want it to look like the following
2018-05-11 : {posts: 2, notes: 1}
I have tried object.assign() but it is just removing the initial posts data - what is the best approach for this?