You need to declare the parameters of the comparator function.
c.sort(function(){
it should be
c.sort(function(a, b){
and you need to call sort in the array as "am not i am", so
var c={'0':[[100,11],[150,12]]}; c[0].sort(function(a, b){ var x=a[0]; var y=b[0]; return yx; });
leaves c in the following state:
{ "0": [ [150, 12], [100, 11] ] }
source share