Mongodb – Updating sub document using save() method in mongoose does not get saved in database and shows no error
I have a Mongoose model like this: const centerSchema = mongoose.Schema({ centerName: { type: String, required: true, }, candidates: [ { candidateName: String, voteReceived: { type: Number, default: 0, }, candidateQR: { type: String, default: null, }, }, ], totalVote:…