I'm trying to update a row in mongodb using mongoose I pass account number which is unique but I can't get this row updated.
this.update({account_no:key},{valid:'true'},{ upsert: true }, function(){});
What is wrong with this?
Thanks,
Please try
this.update({account_no:key}, { $set: { valid: 'true' }},{ upsert: true }, function(){});
and make use of the $set in update parameter. Could be the it!