Input collection: myTestScores15
Name | Score |
Jennifer | 90 |
Robert | 60 |
Jaime | 70 |
Sarah | 100 |
Lynn | 85 |
Mike | 75 |
Steven | 45 |
Output collection: mySolution15
Name | Score |
Steven | 45 |
Robert | 60 |
Jaime | 70 |
Solution code:
//Create a collection
ClearCollect(myTestScores14,
{Name: "Jennifer", Score: 90},
{Name: "Robert", Score: 60},
{Name: "Jaime", Score: 70},
{Name: "Sarah", Score: 100},
{Name: "Lynn", Score: 85},
{Name: "Mike", Score: 75},
{Name: "Steven", Score: 45}
);
//Get the highest scores code
ClearCollect(
mySolution14,
FirstN(Sort(myTestScores14,Score,Descending),3)
);