Closed yellooo closed 8 years ago
I have an object like this:
[{code: 'AZ33', label: 'foo', score: 0.1224}, {code: 'AZ33', label: 'foo', score: 0.5234}, {code: 'B44', label: 'foo', score: 0.5234}, {code: 'B44', label: 'foo', score: 0.6000}]
I made groupBy on the 'code', so i get this output:
AZ33 B44
but i want to filter it on the max 'score' value too.
AZ33, 0.5234 B44, 0.6000
How can i do that with GroupBy and Max, i already try something:
<tr ng-repeat="group in groups | toArray:true"> <td ng-bind="group.$key"></td> <td ng-repeat="data in group | max: 'data.score'"> <span ng-bind="data.score ? (data.score*100 | number:0) + '%' : '-'"></span> </td> </tr>
Oki i resovle it ;)
I have an object like this:
I made groupBy on the 'code', so i get this output:
but i want to filter it on the max 'score' value too.
How can i do that with GroupBy and Max, i already try something: