I have the following Javascript code:
var container = {
  first: {
    a: 1,
    b: 'someString'
  },
  second: Object.assign({
      c: 34,
      d: 'something else'
    },
    this.first
  )
}
console.log(container)
This prints:
{ first: { a: 1, b: 'someString' },
  second: { c: 34, d: 'something else' } }
However, I would like it to be:
{ first: { a: 1, b: 'someString' },
  second: { c: 34, d: 'something else', a: 1, b: 'someString'} }
So I would like all the (key, value) pairs from first to also be present in second. How can that be done?
 
     
     
     
    