导语
根据key值过滤形成新得数组
编辑
核心实现代码
var arr = [{ key: '', value: '所有' }]; orderStatusList && orderStatusList.map((item) => { if ( item.key == '1202011271718478888579391' || item.key == '1202011271718328888637809' || item.key == '1202011271718158888762334' || item.key == '116345258629988888989281' || item.key == '1202011271719298888433205' || item.key == '1202011271718568888010433' ) arr.push({ key: item.key, value: item.value, }); });
运行结果