Updating value in a nested document in mongoDB
I have the following schema: const itemsSchema = new mongoose.Schema({ name: String, checkedValue: String }); const listSchema = new mongoose.Schema({ name: String, items: [itemsSchema] }); I want to update data like this: listSchema>items>checkedValue. I have performed the following operation: db.collections.update({…