MongoDB: How can I query two collections without $lookup?

Hello!

I’m new using Redash and I’m trying to check a value from a collection that have a relationship (1:N)

Like this:

User
-name
-phone
-email

Address
-user_id
-address
-status

I want to get the users that have addresses with the “active” status.

I can’t use $lookup because I’m using an old version of MongoDB (3.0).

So, I would like to query the addresses with “active” status to get the user_id and then query the users with the result, but I haven’t found a way to save the result of a query to use it in another one.

Is there any way to do this or something similar?

Thanks in advance