'Mongoose field showing up when not specified?
I have a Schema Message that has a optional array field 'tags'. When the field tags is not provided, an empty array still shows up in the document. How can I make it so that if tags is not given, the document will not have the field tags. Below is a snippet of the Schema:
tags: { type: [String] }
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
