✅ Перевірена відповідь на це питання доступна нижче. Наші рішення, перевірені спільнотою, допомагають краще зрозуміти матеріал.
Jane wants to create two collections in MongoDB called the parent collection and the child collection. The relationship between the two collections is one-to-many. One document in the parent collection has many related documents in the child collection. She has written the following aggregation query.
db.parent.aggregate([
{$unwind:"$myArray"},
{$lookup:
{ from: "child",
localField: "myArray",
foreignField: "_id",
as: "myArrayDetail"}
}])
What kind of join is $lookup?