Table.update()
Syntax
table.update(key, changes)Parameters
key
Primary key
Return Value
Remarks
Sample
db.friends.update(2, {name: "Number 2"}).then(function (updated) {
if (updated)
console.log ("Friend number 2 was renamed to Number 2");
else
console.log ("Nothing was updated - there was no friend with primary key: 2");
});