title: How to remove property from each item in object with MongoDB
body: <p>I have an object in my document like this:</p>
  
  <pre><code>revisions: {
    &lt;revisionId&gt;: {
      ...
      someProperty: { ... },
    },
    ...
  }
  </code></pre>
  
  <p>I would like to remove <code>someProperty</code> from every nested object in <code>revisions</code> object (i.e. iterate through all the object revisionId keys). I'm asking because if it's not possible I'd rather convert this to an array than do it on the server and possibly overwrite any updates in the mean time.</p>
  
  <p>I tried <code>$unset</code> but I'm only aware of the <code>$[]</code> operator which only works for arrays e.g.</p>
  
  <pre><code>$unset: {
    'revisions.$[].someProperty': 1
  }
  </code></pre>
  
  <p>Thanks</p>