let a = [{
a:1,
b:3,
c:[1, 2, 6]
},
{
a:3,
b:10,
c:[2, 5, 4]
},
{
a:4,
b:3,
c:[7, 12, 6]
},
{
a:4,
b:12,
}]
let b = [2, 6]
I want to return an array from a object that matches from b arrays.
I used :
lodash.forEach(b , (value)=>{
lodash.filter(a, {c: value})
}
but this doesnt work . I tried to simple my code for better underestanding.