I have two columns of value. If the first column any value becomes 0 then sort by another column value.
Probable input
Django Rect
10 20
20 11
1 100
100 1
0 1
0 100
0 9
0 0
0 0
Expected out
Django Rect
100 1
20 11
10 20
1 100
0 100
0 9
0 1
0 0
0 0
I would expect descending order sort. I can sort for any of one column but I need to sort at a time two-column according to the given condition. I have tried so far
all_data.sort(function(a,b){
return a.Django- b.Django;
}
);