I am a beginner to Mongo. I want to simulate an inner join using the aggregate $lookup and I have 3 collections ( 1 in a separate database ) I want to see all the projects that a user is part of can someone give me an example?
Here are the 3 collections
"projects.details"
{
"_id" : ObjectId("5684f3c454b1fd6926c324fd"),
"projName" : "I am a test project",
"active" : "true"
"projId" : "project1"
}
"userDetails.projMembership"
{
"_id" : ObjectId("56d82612b63f1c31cf906003"),
"projId" : "project1",
"userId" : "user1",
"status" : "Invite"
}
"userDetails.details"
{
"_id" : ObjectId("56d82612b63f1c31cf906003"),
"userId" : "user1",
"email" : "user1@somemail.com"
}