When using a query to get a list of emails for a user to be used then in a in query I come across the following issue. My query returns something like this
[{ “address” : “user1@email.com”},{“address” : “user2@email.com”}] or I can change it to
{ “address” : [“user1@email.com”,”user2@email.com”]}
How can I use this result in an in clause, which comes from a query of emails in a array of emails in user doc.
I want to now query all emails where the email in [address of the subquery]