title: Mongodb - proper way to delete all elements in an array field?
body: <p>I'm looking for the proper way to remove all elements from an array field (across all documents) in Mongodb - these appear to be equivalent, which is recommended: (or perhaps some other way?)</p>
  
  <pre><code>db.collection.update({}, { $pull : { 'myArray': {} }}, {multi:true} )
  </code></pre>
  
  <p>or</p>
  
  <pre><code>db.collection.update({}, { $set : {'myArray': [] }} , {multi:true} )
  </code></pre>