title: Mongodb UpdateOne on node js
body: <p>I am facing an issue with MongoDB updateOne. Please check this piece and let me know what is wrong.</p>
  
  <pre class="lang-js prettyprint-override"><code>logger.debug("newindex : " + newindex);
  </code></pre>
  
  <p>//This line is Printing 1596</p>
  
  <pre class="lang-js prettyprint-override"><code>logger.debug("pHash : " + pHash);
  </code></pre>
  
  <p>//This line is printing <code>920e5ef13b1e097a104eb62e9e9c33d069553d807e0bc30a18a3a70fac10db20</code></p>
  
  <p>but the below code is not updating the database.</p>
  
  <pre class="lang-js prettyprint-override"><code>dbobject.collection("Products")
      .updateOne({ index: newindex }, { $set: { previoushash: pHash } })
      .then(function (res) {
          callback();
          db.close();
      });
  </code></pre>
  
  <p>I have tried without callback, with callback, with update, with updateOne, with quotes etc....no result.
  pls check..</p>
  
  <p>NOTE : "Products" collection is existing. 1596 record is existing. DB is up and running. </p>