Сообщество IT-специалистов
Ответы на любые вопросы об IT
Профессиональное развитие в IT
Удаленная работа для IT-специалистов
const impotyList = [ [1,2,3,4,5], [2,3,4,5,6], [3,4,5,6,7], [4,5,6,7,8], ['adasd', 123, 312, 1234] ]; const removeFromImportList = [ [2,3,4,5,6], [3,4,5,6,7], [4,5,6,7,8], ]
const list = [ [1,2,3,4,5], [2,3,4,5,6], [3,4,5,6,7], [4,5,6,7,8], ['adasd', 123, 312, 1234] ]; const remove = [ [2,3,4,5,6], [3,4,5,6,7], [4,5,6,7,8], ] _remove = remove.map(a => a.toString()) list.filter(a => !_remove.includes(a.toString()))
const filtered = impotyList.filter(item => { for (const removeItem of removeFromImportList) { if (JSON.stringify(removeItem) === JSON.stringify(item)) return false; } return true; })