I have two Array called users and invited users
const users = [ {name:'dfd', email: 'gd12@gmail.com'},{name:'fgf', email: 'gfgf12@gmail.com'}]
const invitedUser= [ {name:'aaa', email: 'gd12@gmail.com'},{name:'aaa', email: 'rt@gmail.com'}]
Now I want to filter out the object when the email of a user matches the email of the invited user. For example:
// if -- users.email === invitedUser.email
I know it can be done by using the filter method but here both are arrays and I never worked with two array at the same time and compare the value. any solution