Say I have things
in database with this schema:
{
tags: [String]
}
I have tags
array like this: ["tag1", "tag2"]
now I need to search in things
and get only those which contains my tags.
I've searched and found the $where
operator here but it's not what I need. I was wondering there should be something like
db.things.find( { $where: "this.tags.contains(<my tags somehow>)" } );
in mongo or something like this in mongoose. Any ideas?