This is the array
[
{
"contest_id":1,
"points":10
},
{
"contest_id":2,
"points":10
},
{
"contest_id":1,
"points":11
},
{
"contest_id":2,
"points":9
},
{
"contest_id":1,
"points":12
}
]
In the above array contains list of objects, sort the array of objects based property values like contest_id
with ascending order , points
are descending order .
Output :-
Contest_id points
1 12
1 11
1 10
2 10
2 9