I have the following array
let registrations = [
{user:1, reg_on:'12/02/2009'},
{user:10, reg_on:'11/02/2009'},
{user:5, reg_on:'11/02/2109'},
///others
]
So now am trying to find one record where user is 1 or 5 thats the first
SO i have done the following which works
let final = registrations.find(reg=>reg.user === 1 ||reg.user === 5);
The above works but it becomes tedious if there is a need to add more filter parameters like reg.user === 10
So i have tried refactoring this like
let final = registrations.find(reg=>reg.user.includes([1,5,10]));
But now the one having includes doesnt work. What am i missing out?