Database

[{"collection":"refAgents","count":10,"content":{"_id":{"type":"autoincrement","autoType":"int"},"refAgentName":{"type":"faker","method":"Name"},"refAgentId":{"type":"reference","id":0,"refContent":{"type":"uuid","format":"string"}}}},{"collection":"policyTransactions","count":10,"content":{"_id":{"type":"autoincrement","autoType":"int"},"refAgentId":{"type":"ref","id":0},"bind":{"type":"int","minInt":1,"maxInt":100}}}]

Query

db.refAgents.aggregate([{"$lookup":{"from":"policyTransactions","localField":"refAgentId","foreignField":"refAgentId","as":"bind"}},{"$project":{"_id":0,"refAgentId":1,"binding":{"$first":"$bind.bind"}}}])

Result