title: how to merge two same value javascript object in angular?
body: <p>I have an object like this</p>
  
  <pre><code>var obj1 = {
              key1: {
                  name: book1,
                  count: 5
                  },
              key2: {
                  name: book2,
                  count: 7
                  },
               }
  
  var obj2 = {
              key1: {
                  name: book1,
                  count: 3
                  },
              key2: {
                  name: book2,
                  count: 5
                  },
             }
  </code></pre>
  
  <p>I tried </p>
  
  <pre><code>var obj3 = {... obj1, ...obj2}
  </code></pre>
  
  <p>and got this result </p>
  
  <pre><code>var obj3 = {
              key1: {
                  name: book1,
                  count: 3
                  },
              key2: {
                  name: book2,
                  count: 5
                  },
             }
  }
  </code></pre>
  
  <p>But I expect the result like this</p>
  
  <pre><code>var obj3 = {
              key1: {
                  name: book1,
                  count: 8
                  },
              key2: {
                  name: book2,
                  count: 12
                  },
             }
  }
  </code></pre>
  
  <p>I need to merge these two objects and the count value gets added to the respective object keys
  please help me to get this result thanks in advance</p>