Answer the question
In order to leave comments, you need to log in
How to select only certain elements from a nested array?
There is a document
{
id: ObjectID(),
mas: [{
test: 3,
sdfsbhfn: 1,
sdfbhsnf: 1
}, {
test: 2,
sdgfbhsdnfv: 1,
sdhfdng: 1
}, {
test: 3,
sdfsgbhfnv: 1,
sdhfsndgfj: 3
}]
}
Answer the question
In order to leave comments, you need to log in
If in the finished selection by _id it is necessary, then only aggregation https://docs.mongodb.org/manual/core/aggregation-p...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question