I'm currently working on nesting two ng-repeats with two separate JSON files. The goal is to filter the second ng-repeat based on parameters from the first ng-repeat.
The first JSON file, $scope.matches, includes information about each match in the World Cup. The second JSON file, @scope.predictions, contains predictions made by users for each game.
My objective is to display a match as a header and then list all corresponding predictions underneath it. This process should be repeated for every match until all predictions are displayed accurately. I need to ensure that match.matchnumber equals prediction.matchnumber.
In my Plunker http://plnkr.co/edit/GQmYxZiO53nkIBVczaS9?p=preview, you can observe that the filter isn't functioning correctly because it's being applied to all object parameters instead of just matchnumber.
What would be the simplest approach to resolve this issue? Should I merge the JSONs into a filtered array? If so, what would be the most efficient method?