title: How to remove first n elements from mongodb array?
body: <p>I have such document in mongodb:</p>
  
  <pre><code>{uid:1212, outbox:
   [
     {msg1},
     {msg2},
     {msg3},
     ...
     {msgN}
   ]
  }
  </code></pre>
  
  <pre>
  I want atomically remove first n elements from array outbox.
  
  I know two ways to remove element from array
  1) $pop
    But it removes only one element
  2) {$unset:{outbox.0:1}}  after {$pull:{outbox:null}}
    But it non atomic and removes only one element
  </pre>
  
  <p><strong>Update</strong>
  This is impossible at the moment</p>