title: Added nested object attribute through nested map
body: <p>I want to be able to assign a new nested attribute called <code>likeTotalForComment</code> like this:</p>
  
  <pre><code>{
       comment: [
            {
                 likeTotalForComment:
            }
       ]
  }
  </code></pre>
  
  <p>This is what I currently have written:</p>
  
  <pre><code>commentLikes = data.map(
                      (v,i) =&gt; {
  
                    return(  v.comment.map(
                              (c, ci) =&gt; {
                                newValue = sumFunc(data[i].comment[ci].like, 'value')
                                return data[i].comment[ci] = {likeTotalForComment: newValue}
                              }
                          )
  
                        )
                      }
                  )
  
  console.log(commentLikes)
  </code></pre>
  
  <p>The return gives me this</p>
  
  <pre><code>[[{likeTotalForComment: 2}, {likeTotalForComment: 4}]]
  </code></pre>
  
  <p>Not the entire object with a new nested attribute, which is what I want</p>
  
  <p>Here is some sample data: <a href="https://codepen.io/schoenbl/pen/gVgJLm?editors=0010" rel="nofollow noreferrer">https://codepen.io/schoenbl/pen/gVgJLm?editors=0010</a></p>