title: NodeJS + Mongo: Insert if not exists, otherwise - update
body: <p>I have an object in my mongodb collection. Its schema is:</p>
  
  <pre><code>{
      "instruments": ["A", "B", "C"],
      "_id": {
          "$oid": "508510cd6461cc5f61000001"
      }
  }
  </code></pre>
  
  <p>My collection may have such object, but may not. I need to check if object with key "instruments" exists (<strong>please, notе, I don't know what value "instrument" is at this time, it may contain any value or an array</strong>), and if exists - perform update, otherwise – insert a new value. How can I do this?</p>
  
  <pre><code>collection.find( {  "instruments" : { $exists : true } }, function(err, object){
      if (object) {
          //update
      } else {
          //insert
      }
  });
  </code></pre>
  
  <p>doesn't work ((</p>