Du kan bruge denne forespørgsel:
Library.find({
'id': libraryID,
'collections.id': CollectionID,
'collections.subCollections.id': subCollectionID
}, { 'collections.subCollections.$': 1 }, function(err, data) {
console.log(err, data);
})
Du kan bruge denne forespørgsel:
Library.find({
'id': libraryID,
'collections.id': CollectionID,
'collections.subCollections.id': subCollectionID
}, { 'collections.subCollections.$': 1 }, function(err, data) {
console.log(err, data);
})