let list = [{ key: '', val: '' }, { key: '1', val: '1' }, { key: '1', val: '' }, { key: '1' }, { key: '2', val: '2' }]
list.filter(item => !Object.values(item).includes('')
结果:[{key: '1', val: '1'}, {key: '1'}, {key: '2', val: '2'}]
posted on 2022-03-23 16:39  陌生人!  阅读(303)  评论(0编辑  收藏  举报