title: MongoDb: add element to array if not exists
body: <p>I'm using node.js and Mongo.db (I'm newly on Mongo). I have a document like this:</p>
  
  <pre><code>Tag : {
     name: string,
     videoIDs: array
  }
  </code></pre>
  
  <p>The idea is, the server receives a JSON like </p>
  
  <pre><code>JSON: { 
      name: "sport",
      videoId: "34f54e34c"
  }
  </code></pre>
  
  <p>with this JSON, it has to find the tag with the same name and check if in the array it has the <code>videoId</code>, if not, insert it to the array.</p>
  
  <p>How can I check the array and append data?</p>