数组重新定义key值,去重,排序


undersore.js
this.
soNumbers
=
resp.
result.
map((item
:
any)
=> {
return { text:
item.
soNumber.text, value:
item.
soNumber.value } });


this.
soNumbers
=
_.
uniq(
this.
soNumbers,
false, (item
:
any)
=> {
return
item.value });


this.
soNumbers
=
_.
sortBy(
this.
soNumbers,
'value');