Database

db={"tickets":[{"_id":1,"author":10,},{"_id":2,"author":11,},],"users":[{"_id":10,"department":21,},{"_id":11,"department":22,},{"_id":12,"department":23,}]}

Query

db.tickets.aggregate([{"$lookup":{"from":"users","localField":"author","foreignField":"_id","as":"author"}},{"$unwind":"$author"},{$match:{"author.department":21}}])

Result