title: How do you parse this JSON in Python?
body: <p>JSON below</p>
  
  <pre><code>{"result":[
      {
          "spawn_point_id":"89",
          "encounter_id":"1421",
          "expiration_timestamp_ms":"1470105387836",
          "latitude":38.22,
          "longitude": -91.27
      },
      {
          "distance_in_meters":10,
          "encounter_id":"9677"
      },
      {
          "distance_in_meters":10,
          "encounter_id":"1421"
      },
      {
          "spawn_point_id":"11",
          "encounter_id":"2142",
          "expiration_timestamp_ms":"1470105387444",
          "latitude":38.00,
          "longitude": -91.00
      }
  ]}
  </code></pre>
  
  <p>and i want the output to look like</p>
  
  <pre><code>spawn 89 at lat 38.22 long -91.27
  spawn 11 at lat 38.00 long -91.00
  </code></pre>
  
  <p>i used <code>json.loads</code> and it actually makes the json look funky. </p>
  
  <p>Code so far below:</p>
  
  <pre><code>c = json.loads(r.content)
  for d in c['result']:
      if d['latitude'] is not None:
          print(str(d['latitude']))
  </code></pre>
  
  <p>seems to kind of work but then get error</p>
  
  <pre><code>Traceback (most recent call last):
  File "fast0.py", line 11, in &lt;module&gt;
  if d['latitude'] is not None:
  KeyError: 'latitude'
  </code></pre>