I'm trying to find the values in arrayOne that are not contained in each of the two groups in arrayTwo. In the scenario below I would like isolate b and d for group1 and a and b for group2.
arrayOne = ['a','b','c','d']
arrayTwo = [{
group1:[['a', 4],['c',8]],
group2:[['c', 7],['d',11]]
}]
I've tried several ways up at this point but can't seem to get the order correct. Here is what I currently have:
arrayTwo[0].group1.forEach(e => {
console.log(e)
arrayOne.forEach(f => {
if(e[0] != f) {
console.log(e[0])
}
})
})
Expected result
b
d