{transferTotal: 4463838, touchTotal: 4463861, channelName: "其他", channelId: "OTHER"}
{transferTotal: 10867488, touchTotal: 11260458, channelName: "支付宝", channelId: "ALIPAY"}
{transferTotal: 1036820, touchTotal: 1094788, channelName: "微信", channelId: "WECHAT"}
需要按微信,支付宝,其他 来排序
我的办法很笨,就是遍历,如果是微信,push到新的数组里,把原数组的这个删了,在判断是支付宝,再删,有没有好办法
预设个排序数组,
map
一遍就是你需要的结果了