Skip to main content

All Questions

2 votes
1 answer
480 views

UpdateMany document with array of objects in mongodb

I have a mongodb collection which looks like this [ { pId: "p1", apikey: "a2", count: 0 }, { pId: "p2", apikey: "...
abinas patra's user avatar
0 votes
1 answer
685 views

Mongoose adding product to Cart products array

I've been trying to figure out how to push new product to existing cart which I have in my database. updateOne is searching for a a cart with claimed userId and then ties to insert new product into ...
Johnn's user avatar
  • 57
1 vote
1 answer
31 views

Unable to update data values on mongoDb native findOneAndUpdate query

exports.update_activity_status = (req, res) => { const { campaign_id, leadId, leadActivity, status, } = req.body; const client = mongoClient.connect(`${process.env.MONGO_URL}`...
program_bumble_bee's user avatar
7 votes
0 answers
4k views

Are there incompatibility risks when updating Node.js?

I was just checking if any installed programs required an update and I realized that the latest LTS version of Node.js is 12.13.1 while I have 10.16.0 installed. I was wondering if there are ...
SigmaTheFox's user avatar
0 votes
1 answer
98 views

Is it possible to get a list of installed Windows Updates using node.js?

I am working on a project in JavaScript/Node.js and I want to fetch a list of all installed windows updates similar to using the C# WUAPI 2.0 Type Library. I tried using WMI calls(...
stinsfire's user avatar
0 votes
2 answers
623 views

Update user information

Tried this for updating user information , only phone number but it's not getting update. router.post('/edit', checkAuth, function (req, res, next) { console.log(req.userData.userId) User....
WhoAmI's user avatar
  • 317
1 vote
1 answer
56 views

CouchDB best pratice for update related documents

I am using CouchDB and NodeJs with these document examples. Role { _id, name } User { _id, email, password, role: { _id, name } } What is the best ...
ErickV's user avatar
  • 111
0 votes
1 answer
338 views

Meteor, updated app and now `TypeError: check is not a function`

I am working on updating an old meteor project. It was on a very old version, older than 1.0.0. This app is experiencing this problem at Meteor 1.4.2.3. Another app is working just fine at the same ...
blaineh's user avatar
  • 2,323
0 votes
1 answer
241 views

Right usage of MongoDB update functions in Javascript

I have a probably simple problem using the MongoDB API for updating a document. I have tried several things but nothing was successful. Inserting and deleting in contrast work fine. So what am I ...
user2442635's user avatar
0 votes
2 answers
5k views

Update a field, depending on another field, in MongoDB documents (with Mongoose in Node.js)

I have a collection named Article in MongoDB database, with the following schema and model: var articleSchema = new Schema({ site: String, date: String, day: String, link: { type: ...
GBC's user avatar
  • 345
12 votes
3 answers
27k views

Add a field to existing MongoDB document (with Mongoose in Node.js)

I have this existing document in a collection Article in MongoDB database: [ { site: 'www.atlantico.fr', date: '2014-05-27T11:10:19.000Z', link: 'http://www.atlantico.fr/example.html', _id: ...
GBC's user avatar
  • 345