title: Add json data while classifying in angular
body: <p>I have a json data as :</p>
  
  <pre><code>[{
      "name": "a",
      "data": "north",
      "value": "10",
      "finished": "50"
  }, {
      "name": "b",
      "data": "north",
      "value": "100",
      "finished": "10"
  }, {
      "name": "c",
      "data": "north",
      "value": "20",
      "finished": "50"
  }, {
      "name": "a",
      "data": "south",
      "value": "80",
      "finished": "10"
  }, {
      "name": "b",
      "data": "south",
      "value": "100",
      "finished": "10"
  }, {
      "name": "c",
      "data": "south",
      "value": "30",
      "finished": "70"
  }] 
  </code></pre>
  
  <p>I want to add and classify the data according to name. For example : "name" :"a" will have value 10+80 =90,finished "50+10" =60, b will have value 200 and so on.. </p>
  
  <p>I am storing the json data in angular scope. </p>
  
  <pre><code>$scope.cuurentData = data;
  var totalData = $scope.currentData;
  for (var i = 0; i &lt; totalData.length; i++) {
      if (totalData.name === "a") {
          // right code 
      }
  }
  </code></pre>
  
  <p>Please tell me how to add the data and proceed further here.</p>