Answer the question
In order to leave comments, you need to log in
Why doesn't mongo produce $unwind of arrays on an array?
Document example:
{
myArray: [
{
nestedArray: ["a", "b", "c"]
}
]
}
db.collection.aggregate([$unwind: "$myArray.nestedArray"]) // выдаёт пустой ответ
db.collection.aggregate([$unwind: "$myArray"]) // выдаёт нормально
Answer the question
In order to leave comments, you need to log in
Try twice to make $unwind. First "$myArray", second $myArray.nestedArray"
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question