title: NodeJS MongoDB - how to fix update operation document must contain atomic operators?
body: <p>I'm new to mongodb and Nodejs, I want to know what is the problem with my code,</p>
  
  <p>I'm encountering update operation document must contain atomic operators when using updateOne,</p>
  
  <p>here is my code,</p>
  
  <pre><code>var MongoClient = require('mongodb').MongoClient;
  var url = "mongodb://url-this-is-working";
  
  
  MongoClient.connect(url, function(err, db) {
    if (err) throw err;
    var dbase = db.db("SampleNodeDB"); 
    var myquery = { address: "Valley 345" };
    var newvalues = { name: "Mickey", address: "Canyon 123" };
    dbase.collection("customers").updateOne(myquery, newvalues, function(err, res) {
      if (err) throw erre
      console.log("1 document updated");
      db.close();
    });
  });
  </code></pre>
  
  <p>can someone help me identify and correct the problem,</p>
  
  <p>thankyou!</p>