Mongoose - can't access object properties?
If a field in your document shows up when you console.log
the whole document, but not when you directly access that field, it means the field is missing in the model's schema definition.
So add email
to the schema of User
.