I have an array object like this:
var obj = {
a : [0, 25],
b : [1, 33],
c : [2, 66],
d : [3, 12],
etc..
}
How can I sort it according to the second value of the array ? It should be like that after sorting:
var obj = {
d : [3, 12],
a : [0, 25],
b : [1, 33],
c : [2, 66],
etc..
}
I found a similar issue but it didnt help: Sort by object key in descending order on Javascript/underscore