skip to Main Content

Can I solve a Basic MongoDB Updating query using Node JS?

Here's the document of mongodb: { _id: new ObjectId("646fa9b33e467de3f38b2418"), price: 3500, orderConfirmation: false, dateConfirmationOrder: null, dateDelivered: null, clothID: '6450c20d7fd78c92313cd348', clientName: 'irtaza', clientNumber: 3320523524, desc: '11', address: 'Ahsan road, kala gujran, jhelum', marketerPayment: 200, marketerPaymentStatus: false, quantity: 1, deliveryStatus: false, marketerid:…

VIEW QUESTION

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({…

VIEW QUESTION

Can’t access ‘skills’ in MongoDB?

const skillsSchema = { title: String, description: String, }; const Skill = mongoose.model('Skill', skillsSchema); const teacherSchema = { profession: String, teacherFName: String, bornDate: Number, priceperhour: Number, videolink: String, email: String, password: String, skills: [skillsSchema], }; const Teacher = mongoose.model('Teacher', teacherSchema);…

VIEW QUESTION
Back To Top
Search