i have a nested document which I want to reuse in multiple schemas. Here is what the common object i want to nested looks like: I don’t want to use a subdocument as I don’t want the embedded document to have an id
infoCategory:{
option: String,
name: String,
}
const catalogSchema = new mongoose.Schema({
info: infoCategory,
//other fields
})
const articleSchema = new mongoose.Schema({
info: infoCategory,
//other fields
})