Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

count documents mongoose

/* countDocuments for when you have a specification, 
estimatedDocumentCount otherwise */

await model.countDocuments({ name: 'Florin' })
await model.estimatedDocumentCount();
 
PREVIOUS NEXT
Tagged: #count #documents #mongoose
ADD COMMENT
Topic
Name
4+4 =