I have an array like this
arr = [[24,4], [44,5],[67,1], [30, 2], [67, 2]]
If i am using arr.sort{|a,b| b[0]<=>a[0]} i get this result
[[67,1], [67, 2], [44,5], [30, 2], [24,4]] - #[value, id]
How to sort again the array to achieve this result
[[67,2], [67, 1], [44,5], [30, 2], [24,4]] - #[value, id]
If there are same values, then the sort should happen on id descending .
thanks