Array includes

Is there any way to filter data based on array includes?
Example: I have a query that takes in userId param and I have a collection "userMessages" with field "users" which is array of userIds
How can I filter the data based on users.includes(userId)?
Are there any code examples for this?
Was this page helpful?