title: how to calculate the sum of amount for same names in ng-repeat using angularjs
body: <p>here is app.js</p>
  
  <pre><code>AllServices.teamAllDataFunction1(User)
          .then(function(response) {
              $scope.User.data=response.data['DeatilTeam'];
              console.log($scope.User.data);
              var sum = 0;
              for (var i = 0; i &lt; ($scope.User.data).length; i++) {
                  sum += parseInt($scope.User.data[i].dp_inst_pending) || 0;
              }
  });
  </code></pre>
  
  <p>here m getting all data in which so many records having same name but differnt pending amount, so i want to show only single name and the summation of there penging amount, so that i can show it in single row. I'm not getting how to achieve it.. please help me..</p>
  
  <p>here is html,</p>
  
  <pre><code>&lt;table ng-table&gt;
                  &lt;tr&gt;
                      &lt;th&gt;advisor_name&lt;/th&gt;
                      &lt;th&gt;totalpending&lt;/th&gt;
                  &lt;/tr&gt;
  
                  &lt;tr ng-repeat="data in User.data" ng-if="data.dp_inst_pending &amp;&amp; data.dp_inst_pending == 0"&gt;
                      &lt;td&gt;{{data.AdvisorName}}&lt;/td&gt;
                      &lt;td&gt;{{data.dp_inst_pending}}&lt;/td&gt;  
                  &lt;/tr&gt;
              &lt;/table&gt;
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/9Yyak.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9Yyak.png" alt="enter image description here"></a></p>
  
  <p>in this way i 'm getting data</p>