title: Delete null values from 2d JSON
body: <p>I have a 2 dimentional json which looks like this:</p>
  <pre><code>a =  [
     {
      &quot;photo&quot;: null,
      ....
      &quot;webUrl&quot;: null,
      &quot;createdByUser&quot;: null,
      &quot;lastModifiedByUser&quot;: null,
      &quot;id&quot;: &quot;154854566458484754....&quot;
      },
      {
      &quot;photo&quot;: null,
      ....
      &quot;webUrl&quot;: null,
      &quot;createdByUser&quot;: null,
      &quot;lastModifiedByUser&quot;: null,
      &quot;id&quot;: &quot;154854566458484000....&quot;
    },
   ]
  </code></pre>
  <p>how can I remove all null values with the help of python ?</p>
  <p>For a one-dimensional Json I get it like this:</p>
  <pre><code>filtered_data = {}
  for key, value in data.items():
      if value != None:
          filtered_data[key] = value
  </code></pre>
  <p>but for more two-dimensional Json json I don't get it quite right</p>
  <pre><code>   filtered_data = {}
     list          = []
  
      i = 0
      length = len(data) 
      for i  in range(0, length):
          for key, value in data[i].items():
              if value != None and key != '@odata.type':
                  filtered_data[key] = value
          list.append(filtered_data) 
  
      return list
  </code></pre>
  <p>so I get several times the last entry of the json</p>