Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

lookup in mongodb array

> db.demo396.aggregate([
...    { "$lookup": {
...       "from": "demo395",
...       "let": { "details": "$details" },
...       "pipeline": [
...          { "$match": { "$expr": { "$in": [ "$_id", "$$details" ] } } }
...       ],
...       "as": "output"
...    }}
... ])
Source by www.tutorialspoint.com #
 
PREVIOUS NEXT
Tagged: #lookup #mongodb #array
ADD COMMENT
Topic
Name
7+9 =