javascript - js如何将匹配到的数组元素删掉?
扔个三星炸死你
扔个三星炸死你 2017-06-19 09:07:51
0
3
801
雷雷 雷雷
扔个三星炸死你
扔个三星炸死你

全部回复(3)
某草草

arr = arr.filter(item => !(/^test|^System/i.test(item.ServiceID)))

刘奇

雷雷

仅有的幸福

Array.filter方法,将过滤后的数组赋值回arr

arr = arr.filter(function(item) {
    return !(/^(test|System)/g.test(item.ServiceId || ''));
});
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板