有一个很好的方法可以根据几个属性对对象数组进行排序:
var data = _.sortBy(array_of_objects, ['type', 'name']);
However that is only for ascending sorting. Is there some handy way of defining direction per column? E.g.
var data = _.sortBy(array_of_objects, [{'type': 'asc'}, {'name': 'desc'}]);