Message from JavaScript discussions

September 2020

— Ask directly your question

— 

I have documents one is for user profile

{
userId: ....

}

and another is for assigned roles
{
userId: ....
roleId:....
}

the third one is for roles
{
id:....
title:.....
}

— I fetching all the users and along with them I want the corresponding role title.

— How can I do that?

— I'm using nodejs.

— I think you could try graphql, so you don't have to make multiple requests: https://docs.mongodb.com/realm/graphql/

Message permanent page

— Sounds like you want a JOIN type operation

— Are you using SQL?

— Nope

— Im using mongodb

— Yes

— Check Mongo docs for join type operations