title: Calculate the percentage and put it into a progressbar
body: <p>Hi I have some data from the World Cup 2014, where I store if the person has bet correctly on matches.</p>
  
  <p>It looks like this (data in a angularjs-controller):</p>
  
  <pre><code> $scope.users=  [{
               id: 1,
               name: 'Jake',
               loss: 22,        
               win: 10
           },
           {
               id: 2,
               name: 'Bran',
               loss: 18,
               win: 14
           }];
  </code></pre>
  
  <p>I would like to calculate the percentage of how many wins there have been.
  That could be done if I divide total wins by the total matches, 18/(18+14) = 56% for example.
  I need get data from each user in the json and calculate the percentage of wins. 
  I would later like to add that percentage to a progressbar for each user in the view:</p>
  
  <pre><code>&lt;div class="progress progress-striped"&gt;
    &lt;div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="40" aria-valuemin="0" aria-valuemax="100" style="width: 40%"&gt;
      &lt;span class="sr-only"&gt;40% Wins&lt;/span&gt;
    &lt;/div&gt;
  </code></pre>
  
  <p>How can I achieve this ?</p>