const arr = [ { label: '2', value: '2' }, { label: '1', value: '1' }, { label: '3', value: '3' } ] // 把value=1和value=2的数据筛掉 let newArr = arr.filter(opt => ['1', '2'].includes(opt.value) ) console.log(newArr) // [{label: '3', value: '3'}]
标签:opt,arr,多个,newArr,value,label,筛选,js From: https://www.cnblogs.com/GmxNotes/p/17640259.html