title: break a forEach with angularJS
body: <p>I need some help. I have 2 loops to traverse two lists of records . The thing is that at some point should put a break or something, because the last loop crushes the value I'm looking for.</p>
  
  <p>This is my code </p>
  
  <pre><code>  for (var i in $scope.users) { 
                  for (var j in $scope.states) {
                      if ($scope.users[i].id === $scope.states[j].user) {
                          if ($scope.states[j].estado === 'totallyBussy') {
                              $scope.users[i].estado= 'Not available';
  
  
                          } else if ($scope.states[j].estado === 'partlyBussy') {
                              $scope.users[i].estado= 'Maybe available';
  
                          } 
                      }  
                      else {
                               $scope.users[i].estado= 'Available';
                          }                    
                  }  
  
              }
  </code></pre>
  
  <p>Where user 4 and user 5 should be 'Maybe available' and 'Not available', but with this code, I'm getting 'Available for user 0, 1, 2, 3, and the last one. And the last one is crushes with else. </p>
  
  <p>I hope I explained well.</p>
  
  <p>Thanks so much</p>