[sc-users] double sorting

Tom Hall scth at ludions.com
Mon Dec 4 13:58:56 PST 2006


hello list

given

l = [[2, "z"], [1, "z"], [1, "a"], [2, "a"]]

how can i sort first by l[0], then l[1]
so to get

[ [ 1, a ], [ 1, z ], [ 2, a ], [ 2, z ]]

of course
l.sortBy(0).sortBy(1) does not do it

regards

tom




More information about the sc-users mailing list