How to compare a field to a field of a array in mongodb
I have a documents like below. I want to retrieve all documents whose address.city == "newyork" and address.id == active. [ { "name": "star1", "active": 1, "address": [ { "id": 1, "city": "newyork" }, { "id": 2, "city": "sydney" }…