title: Loop through an array of arrays containing object, and update the array in JavaScript/Angular
body: <p>I am trying to loop through an array of arrays with object <code>[[{},{},{}],[{},{},{}]]</code>, and create a new array that basically "totals" the arrays. I am a bit at a loss on how to achieve this.</p>
  
  <p><strong>My data looks like this:</strong></p>
  
  <pre class="lang-js prettyprint-override"><code>[
    [{
      "2017-01-05": 607
    }, {
      "2017-01-06": 430
    }, {
      "2017-01-07": 357
    }, {
      "2017-01-08": 277
    }],
    [{
      "2017-01-09": 607
    }, {
      "2017-01-10": 430
    }, {
      "2017-01-11": 357
    }, {
      "2017-01-12": 277
    }]
  ],
  </code></pre>
  
  
  
  <p><strong>I would like to "count" and "label" each week, and total each week. Example:</strong> </p>
  
  <pre><code>newArray: [{"Week 1": 1075}, {"Week 2": 1590}]
  </code></pre>
  
  <p>I know I should probably use a <code>forEach</code> loop, but then it gets a bit sketchy: </p>
  
  <pre><code>dateArray.forEach( function (arrayWeek)
  {
    // push and name etc. functionality
  });
  </code></pre>
  
  <p>I would greatly appreciate your assistance and guidance. </p>