So I'm trying to check if an array of objects formatted like this:
const array = [
{
date: new Date(),
userid: 123123
},
{
date: new Date(),
userid: 13222323
},
...
]
So,
I want to check if one of these objects contains a the current user id (of a user logged in), if the array of object contains it once, then return a Boolean value true, if not return false.
I don't want to use some
because it will return false and true, if there are other objects that do not have the same user id.