Linked Questions

1 vote
2 answers
1k views

A user has the ability to add languages. languages are stored as an array of type teach or learn in the userschema. I can simply add a language to the languages.teach[] by using push, but how do i ...
Kay's user avatar
  • 339
1 vote
3 answers
88 views

The following is my array, [ { "key_id": "#K000030", "_id": "K000030", "isMaster": true, "specialties": [ { "speciality1_count": "x039", "speciality1"...
Testimg198's user avatar
224 votes
6 answers
251k views

Here is array structure contact: { phone: [ { number: "+1786543589455", place: "New Jersey", createdAt: "" } { number: "+...
Justin John's user avatar
  • 9,748
1 vote
3 answers
2k views

I have already checked the following stackoverflow questions: Mongoose delete array element in document and save How to remove array element in mongodb? Here is what I tried: var User = require('../...
GaborH's user avatar
  • 719
2 votes
1 answer
1k views

I have the following structure and am trying to remove an object in participants (league.division.participants). var participantSchema = new mongoose.Schema({ player: { type: mongoose.Schema.Types....
Mark's user avatar
  • 2,031
0 votes
1 answer
259 views

I have following schema for Audio. const AudioSchema = new mongoose.Schema({ name: { type: String, required: true }, uploaderId: { type: String, required: ...
Batın Evirgen's user avatar
0 votes
1 answer
178 views

I have an array in my model document. I would like to remove one id in that array. Is this possible? This is what I tried. module.exports.RemoveFavourite = async (req, res, next) => { try { ...
Harvey's user avatar
  • 54
0 votes
0 answers
89 views

This is the mongoDb document and it have listItems in it in form of Array. How can I delete the objects inside listItems with their respective itemsId. I'm passing itemsId as a params from url So ...
buggy_coder's user avatar
0 votes
1 answer
59 views

I'm building a todo app and in the database have an employee document containing 2 arrays (todo & done). The tasks are stored here, and I currently can add tasks to the arrays, but I'm having ...
john f's user avatar
  • 1
0 votes
1 answer
50 views

I have an API in which I am deleting 'course' documents in the following way: module.exports.deleteCourse = function(req, res){ var courseid = req.params.courseid; if(courseid){ Course....
Tyler B. Joudrey's user avatar