Let's assume we have
post1.tags = [ '1', '2', '3' ];
post2.tags = [ '2', '4', '5' ];
post3.tags = [ '1', '3', '4' ];
post4.tags = [ '1', '3', '4', '5', '6' ];
I'm trying to find posts which are containing 2 or more of the given tags [ '1', '3', '5' ]. The result should be post1, post3 and post4. How can write a mongodb query to achieve this?