title: MongoDB - Clearing items in a nested array
body: <p>If I have a nested array in my schema, how do I tell MongoDB to remove its entries for a specific model?</p>
  
  <p><strong>Schema</strong></p>
  
  <pre><code>var UserSchema = new Schema({
    username: String,
    documents: [Number]
  });
  </code></pre>
  
  <p>I tried something like this: </p>
  
  <pre><code>db.users.update({"username": "tom"}, {"$pullAll": {"documents": []}})
  </code></pre>
  
  <p>But the items in the nested array are still there.</p>