How do I delete an item from a Schema which is an array of objects in mongoose?
问题 I want to delete a resume from list of resumes in my schema. I'm using mongoose(5.9.7) and express js. Schema const ResumeSchema = new Schema({ user: { type: Schema.Types.ObjectId, ref: "User" }, fileLink: { type: String, required: true }, fileName: { type: String, required: true }, description: { type: String, required: true } }); module.exports = Resume = mongoose.model("Resume", ResumeSchema); I have a route to fetch all the resumes. I'm creating a ref of resume in my ProfileSchema as well