title: Loop through a list of values of a specific record
body: <p>I have the following database:</p>
  
  <pre><code>{
    "games" : [ {
      "event" : [ "Event 1", "Event 2", "Event 3" ],
      "name" : "Game 1"
    }, {
      "event" : [ "Event 1", "Event 2", "Event 3" ],
      "name" : "Game 2"
    } ]
  }
  </code></pre>
  
  <p>I am trying to figure out how to loop through all events for a specific game using attributes with angularjs.  Here is an example:</p>
  
  <p>Here I loop through all the games and print out buttons with each game. Then if you click on the button it makes the game become active:</p>
  
  <pre><code>&lt;div class="row"&gt;
      &lt;div class="col-xs-12 col-md-4 noPadding" ng-repeat="game in data.games"&gt;
          &lt;div class="form-group"&gt;
              &lt;button 
                  type="button" 
                  class="btn largeButton" 
                  ng-class="{'btn-success':game==data.game,'btn-danger':gameType!=data.game}" 
                  ng-click="data.child('game').set(game);"&gt;
                  {{game}}
              &lt;/button&gt; 
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Now next I need to loop through all the events and print out the buttons for that game, but I'm not sure how to accomplish this through attributes.</p>
  
  <pre><code>&lt;div ng-repeat="event in data.games.where(game:game.name == 'Game 1').events"&gt;
  </code></pre>
  
  <p>Is something as what I wrote above possible?</p>
  
  <p>I'm rather new with angularjs. I was looking at using <code>| filter</code> but I can't seem to figure out how to do the expression.</p>