Answers for "mongodb match multiple nested"

1

mongodb match multiple nested

// Use $elemMatch
Model.findOne({
	views: {
       $elemMatch: {
           year: 2012,
           month: 6 
       }
    }
}, {
	'views.$': 1
})
Posted by: Guest on October-14-2021

Code answers related to "mongodb match multiple nested"

Code answers related to "TypeScript"

Browse Popular Code Answers by Language