How remove elements of array from another array? I have first array ["a" "b" "c"]. And second array [["a", "e"], ["e", "b", "c"], ["a","c"]].
How remove elements of first array from second array?
as a result, get [["e"], ["e"], []].
How remove elements of array from another array? I have first array ["a" "b" "c"]. And second array [["a", "e"], ["e", "b", "c"], ["a","c"]].
How remove elements of first array from second array?
as a result, get [["e"], ["e"], []].
const first = [
["a", "e"],
["e", "b", "c"],
["a", "c"]
]
const second = ["a", "b", "c"]
const result = first.map(el => {
return el.filter(elem => !second.includes(elem))
})
console.log(result)