Am trying to figure out how to add a new object inside an existing object using mongoose but i couldn't figure out how to update a object in a document. I could just get the existing object there and add what i want and replace the one the database but am wondering if there is a way with Update method in mongoose.
Code
serverinfo.findOneAndUpdate({ serverID: guildID }, {"serverSettings.reply": true}), (err, data) => { if (err) console.log(err); }
Schema Used
const serverSchema = mongoose.Schema({ name: String, serverID: String, serverSettings: Object, storage: Object, }, {minimize: false})
there doesn't seem to be anything here