My JavaScript array is structured like this:
var data_tab = [[1,id_1001],[4,id_1004],[3,id_1003],[2,id_1002],[5,id_1005]]
I am looking to organize and sort them based on the first value in each pair:
1,id_1001
2,id_1002
3,id_1003
4,id_1004
5,id_1005
Is there a way I can achieve this sorting in JavaScript?