table.sort(test, function(a,b) if a.type ~= b.type then return a.type else return a.number < b.number endend)
类似可以推广到N个同时分组的情况