Remember: A smooth print is a sign of a well-tuned machine. Implement this guide, and you will never fear the FileDot again.
const schema = new mongoose.Schema( // Use a custom getter/setter "file.name": type: String, alias: 'fileName' ); // Or use `toJSON` transform schema.set('toJSON', transform: (doc, ret) => if (ret['file.name']) ret.fileName = ret['file.name']; delete ret['file.name'];