I have a mongodb structure like.
The structure of the place model
{.....
amenities: [
{
name: "wifi",
is_free: true
},
{
name: "projector",
is_free: false,
price: "50"
},
...........
...........
...........
]
.....}
I want to do a query where, I want to search for a place which is having some set of amenities exist in the place irrespective of the price & is_free
fields. How can I do it inside the mongodb / mongoose query.
I want list of places which are having set of amenities like wifi and projector as a output.