I am using React for this, but the concept is in javascript. So hopefully I can leave React code out for simplicity sake.
I have two arrays that I need to filter out. My
You could use filter on the first array ,and includes on the second array:
filter
includes
arr1 .filter(e => arr2.map(e2 => e2.id).includes(e.id)) .map(e => return (Match));