Docs Menu
Docs Home
/ / /
Node.js Driver
/ /

Replace Documents

In this guide, you can learn how to use Node.js driver to perform a replace operation on a document in a MongoDB collection. A replace operation performs differently than an update operation. An update operation modifies only the specified fields in a target document. A replace operation removes all fields in the target document and replaces them with new ones.

Back

Modify Documents