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

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

猜你喜欢

转载自blog.csdn.net/huhuhuja/article/details/116518637