1db.Employee.update(
2{"Employeeid" : 1},
3{$set: { "EmployeeName" : "NewMartin"}});
4
1db.collectionName.update({"aField":"vale1"},{$set:{"anotherField":"value2"}})
2
3-search for documentations for more examples than search
4-aField is used to find the documents
5-anotherField is the field that will be updated
6-You can also use the below:
7-- updateOne
8-- findOneAndUpdate