What is a virtual property?
It is a property that is returned with documents during a query but is not stored in the database
How do you create a virtual property in Mongoose?
SchemaName.virtual(‘virtual property name’).get(function (){return this.attr * this.attr} ) ;
How do you make Mongoose aware of virtual properties?
const SchemaName = new mongoose.Schema({}, { toJSON: {virtuals: true}, toObject: {virtuals: true} })