这是我的阵列:
var arr = [
['ABC', '01/01/2016', '000000001'],
['ABC', '02/01/2016', '000000002'],
['ABC', '03/01/2016', '000000003'],
['DEF', '01/01/2016', '000000004'],
['DEF', '02/01/2016', '000000005'],
['DEF', '03/01/2016', '000000006'],
];
首先,我想通过第二列DESC然后通过第一列ASC对其进行排序,以获得此结果:
var arr = [
['ABC', '03/01/2016', '000000003'],
['DEF', '03/01/2016', '000000006'],
['ABC', '02/01/2016', '000000002'],
['DEF', '02/01/2016', '000000005'],
['ABC', '01/01/2016', '000000001'],
['DEF', '01/01/2016', '000000004'],
];
这可能吗?我在这里找到的例子只允许对一个方向进行排序。第三列可以是第一列和第二列的组合(如果这有助于排序)