How to join query in mongodb?

后端 未结 10 2231
情深已故
情深已故 2020-11-29 03:22

I have user document collection like this:

User {
   id:\"001\"
   name:\"John\",
   age:30,
   friends:[\"userId1\",\"userId2\",\"userId3\"....]
}
         


        
10条回答
  •  悲哀的现实
    2020-11-29 03:57

    https://docs.mongodb.org/manual/reference/operator/aggregation/lookup/

    This is the doc for join query in mongodb , this is new feature from version 3.2.

    So this will be helpful.

提交回复
热议问题