title: Remove element from array in mongodb
body: <p>I am new in mongodb and i want to remove the some element in array.</p>
  
  <p>my document as below </p>
  
  <pre><code>{
    "_id" : ObjectId("4d525ab2924f0000000022ad"), 
    "name" : "hello", 
    "time" : [
        {
                "stamp" : "2010-07-01T12:01:03.75+02:00",
                "reason" : "new"
        },
        {
                "stamp" : "2010-07-02T16:03:48.187+03:00",
                "reason" : "update"
        },
        {
                "stamp" : "2010-07-02T16:03:48.187+04:00",
                "reason" : "update"
        },
        {
                "stamp" : "2010-07-02T16:03:48.187+05:00",
                "reason" : "update"
        },
        {
                "stamp" : "2010-07-02T16:03:48.187+06:00",
                "reason" : "update"
        }
    ]
  }
  </code></pre>
  
  <p>in document, i want to remove first element(reason:new) and last element(06:00) .</p>
  
  <p>and i want to do it using mongoquery, i am not using any java/php driver.</p>