I have a list whose members are nested lists of integers, for example :
[ [1,2], [], [1,2,3], [ [1,2],3], [1,2,4], [ [], [1,2] ], [34,5,6], [-1,66] ]
I want to sort this list, using (what every other language in the world) would consider standard ordering of nested lists. For example :
[] < [ [1] ] < [ [1,2] ] < [ [2] ] < [ [11] ]
l.sort()
messes this up, because it turns the lists into strings
Is there an easy way, either in javascript (or a common library like lodash) to get a proper sort of nested lists?