title: How do I update a doc in Cloudant using Cloudant Node.js
body: <p>So, what I'm doing should be really simple, and maybe it is and I'm just doing something wrong. I want to update an existing document in my database but I'm having some issues, can someone please advise?</p>
  
  <p>Nano's Documentation states the following for insert:</p>
  
  <pre><code>db.insert(doc, [params], [callback])
  </code></pre>
  
  <p>Therefore, I should surely be able to do the following:</p>
  
  <pre><code> var user = {
     'firstname' : 'my',
     'secondname' : 'name'
  };
  
  db.insert(user, {_rev: '2-cc5825485a9b2f66d79b8a849e162g2f'}, function(err, body) {}); 
  </code></pre>
  
  <p>However, whenever I try this, it creates an entirely new document. If I do the following then it will indeed update my document, but of course, with nothing in this document other than the _rev:</p>
  
  <pre><code>db.insert({_rev: '2-cc5825485a9b2f66d79b8a849e162g2f'}, function(err, body) {});
  </code></pre>
  
  <p>So the question is, how do I pass in my object and get it to update, rather than creating a new record?</p>