I have two list of object like this:
List<Result> result = [{id: 1, country: 'France'}, {id: 2,country: 'Sweden'}, {id: 5,country: 'Denmark'}]
List<OrderResult> orderResult = [{id: 5, score: 12}, {id: 1, score: 11}, {id: 2, score 10}]
I would order the list result based on the order of the array orderResult to obtain this final result:
result = [{id: 5, country 'Denmark'}, {id: 1, country: 'France'}, {id: 2, country: 'Sweden'}]