I have the following array:
[[8, 1], [1, 1], [3, 1], [8, 1], [4, 0], [2, 0]]
How to sort the array based on the first value of the element and if