I am new to MongoDB and am trying to retrieve the size of a single document from a database.
The database is named "enron
"
The collection is named "email
"
I tried:
Object.bsonsize(db.email.findOne())
I also tried:
Object.bsonsize(db.enron.findOne())
But it only returns 0
.
How can I get the size of a document?
Thank you!