title: mongodb pull all element from the array
body: <p>Suppose I have the following schema:</p>
  
  <pre><code>"_id" : 1,
    "n" : [{
        "a" : ObjectId("4ef0ca414653b7c866040000"),
        "d" : new Date("Thu, 22 Dec 2011 04:53:56 GMT +04:00")
      }, {
        "a" : ObjectId("4ef0ca414653b9c866040000"),
        "d" : new Date("Thu, 22 Dec 2011 04:54:11 GMT +04:00")
      }, {
        "a" : ObjectId("4ef0ca424653b9c866040000"),
        "d" : new Date("Thu, 22 Dec 2011 04:54:30 GMT +04:00"),
     }]
  </code></pre>
  
  <p>and I need to remove all n, where d is less than specific date.</p>
  
  <p>So I thought I will be able to do this in the following way:</p>
  
  <pre><code>db.coll.update({
  '_id': 1
  },{
   $pullAll : {
    n.d : {
       $lte : new Date(2000, 10, 11)
     }
   }
  })
  </code></pre>
  
  <p>but the problem is, that it is not working this way.
  Any suggestions?</p>