lodash中的数据格式

时间:2019-05-21 09:21:56

标签: javascript typescript lodash

我想使用lodash之类的以下格式对数组进行排序

$,/,2,3,A,a,B

从以下对象值

    {label: "2", objects: Array(0), toString: ƒ, status: 1}
    {label: "a", objects: Array(0), toString: ƒ, status: 1}
    {label: "3", objects: Array(0), toString: ƒ, status: 1} 
    {label: "$", objects: Array(0), toString: ƒ, status: 1}
    {label: "A", objects: Array(0), toString: ƒ, status: 1}
    {label: "B", objects: Array(0), toString: ƒ, status: 1}
    {label: "/", objects: Array(0), toString: ƒ, status: 1}

我尝试了这个_.toArray( object, 'sort' ),但没有运气

请专家咨询

0 个答案:

没有答案