I'm trying to do two nested ng-repeats with two json's, where the second ng-repeat is filtered by the parameter of the first ng-repeat.
First json $scope.matches contains the information on every match in the World Cup. The second json @scope.predictions contains each users predictions for each game.
Now i want to ng-repeat a match as a header, and then list all of the predictions for that specific game. Repeat until every prediction is listed under the right game. I have match.matchnumber = prediction.matchnumber.
In my Plunker http://plnkr.co/edit/GQmYxZiO53nkIBVczaS9?p=preview you can see, that the filter doesn't work, since it applies to every object parameter, and not only matchnumber.
What is the easiest way to make this work? Maybe I should combine the jsons into an filtered array? How would this be done the smart way