Lets say that I have this user schema that has a inventory with multiple slots. How could I nest those slots in to the inventory?
For example like this:
const UserSchema = new mongoose.Schema({
Inventory: {
slot1img: {
type: String
},
slot1text: {
type: String
},
slot2img: {
type: String
},
slot2text: {
type: String
},
slot3img: {
type: String
},
}
})
However if I try it like this it wont show up at all in the database, so how do i do this?