different schema keys in mongoose code example
Example 1: mongoose schema multiple types
{
type: Schema.Types.Mixed
}
Example 2: array schema mongoose
const ToySchema = new Schema({ name: String });
const ToyBoxSchema = new Schema({
toys: [ToySchema],
buffers: [Buffer],
strings: [String],
numbers: [Number]
// ... etc
});