title: Remove all fields that are null
body: <p>How can I remove all fields that are <code>null</code> from all documents of a given collection?</p>
  
  <hr>
  
  <p>I have a collection of documents such as:</p>
  
  <pre><code>{
      'property1': 'value1',
      'property2': 'value2',
      ...
  }
  </code></pre>
  
  <p>but each document may have a <code>null</code> entry instead of a value entry.</p>
  
  <p>I would like to <a href="https://stackoverflow.com/a/12413217/1150961">save disk space</a> by removing all <code>null</code> entries. The existence of the <code>null</code> entries does not contain any information in my case because I know the format of the JSON document a priori.</p>