数组对象根据某一个元素排序

arr.sort((a,b)=>a.type-b.type)

Guess you like

Origin blog.csdn.net/huhuhuja/article/details/116518637