Sorting on a custom order

后端 未结 4 1434
旧巷少年郎
旧巷少年郎 2020-12-09 08:28

I was wondering how I can sort an array on a custom order, not alphabetical. Imagine you have this array/object:

var somethingToSort = [{
    type: \"fruit\"         


        
4条回答
提交回复
热议问题