title: Better way to sum a property value in an array
body: <p>I have something like this:</p>
  <pre><code>$scope.traveler = [
              {  description: 'Senior', Amount: 50},
              {  description: 'Senior', Amount: 50},
              {  description: 'Adult', Amount: 75},
              {  description: 'Child', Amount: 35},
              {  description: 'Infant', Amount: 25 },
  ];
  </code></pre>
  <p>Now to have a total Amount of this array I'm doing something like this:</p>
  <pre><code>$scope.totalAmount = function(){
         var total = 0;
         for (var i = 0; i &lt; $scope.traveler.length; i++) {
                total = total + $scope.traveler[i].Amount;
              }
         return total;
  }
  </code></pre>
  <p>It's easy when is only one array, but I have others arrays with a different property name that I would like to sum.</p>
  <p>I would be happier If I could do something like this:</p>
  <pre><code>$scope.traveler.Sum({ Amount });
  </code></pre>
  <p>But I don't know how to go through this in a way that I could reuse it in the future like this:</p>
  <pre><code>$scope.someArray.Sum({ someProperty });
  </code></pre>