Database

[{"key":1},{"key":2}]

Query

db.collection.aggregate([{$lookup:{from:"UnreadCount",let:{sessionId:"$_id"},pipeline:[{$match:{$expr:{$eq:["$$sessionId",{$toObjectId:"$sessionId"}]}}}],as:"unreadCounts"}}])

Result