title: How to get a the sum of multiple arrays within an array of objects?
body: <p>I was wondering how you get the sum of multiple arrays within an array of objects. My code is as follows:</p>
  
  <pre><code>const employeeList = [    
  
      {
      "name": "Ahmed",
      "scores": [
      "5",
      "1",
      "4",
      "4",
      "5",
      "1",
      "2",
      "5",
      "4",
      "1"
      ]
      },
      {
      "name": "Jacob Deming",
      "scores": [
      "4",
      "2",
      "5",
      "1",
      "3",
      "2",
      "2",
      "1",
      "3",
      "2"
      ]
      }];
  
  var sum = 0;
  
  for(let i = 0; i &lt; employeeList.length; i++){
    var eachScore = employeeList[i].scores;
    const b = eachScore.map(Number);
    console.log(b);
  
    sum += parseInt(b);//this is the code that doesn't work
  
  }
  
  console.log(sum);
  </code></pre>
  
  <p>So the problem is, I can get the two arrays to console log but I'm not sure how to go about summing up each array.. When I do sum += parseInt(b), it just logs how many items are in the array(9). and When I do without parseInt, it concats the numbers together but doesn't sum them up.. I would like to use a .split() method to split the arrays and sum them up individually but I haven't quite figured out how to do it yet. </p>