I'm working in a JavaScript project where in this case I am trying to get the two arrays with the biggest value in position 2.
[-20.172, 35.251, 0],
[-16.368, 21.792, 26.81],
[-29.311, 18.393, 0],
[14.54, 15.23, 0],
[-1.61, 12.91, 27.692],
[0, 0, 0]
the intended answer should be like this:
[-16.368, 21.792, 26.81],
[-1.61, 12.91, 27.692]
I can't sort by the ones that have a zero and the ones who doesn't have it, some other cases in the project I'm working could possibly have different numbers on the position 2.
any suggestions?