title: Getting Keyerror when parsing JSON in Python
body: <p>I have just made a program to parse some data from an api. The api gives data back with a JSON format. When I try to parse it it gives me a key error</p>
  
  <pre><code>    url = json.loads(r.text)["url"]
      KeyError: 'url'
  </code></pre>
  
  <p>This is the part of the code</p>
  
  <pre><code>url = json.loads(r.text)["url"]
  </code></pre>
  
  <p>I am trying to get the data in the plain field. Here is the output from the API:</p>
  
  <pre><code>{"updates":[{"id":"a6aa-8bd","description":"Bug fixes and enhancemets","version":"8.1.30","type":"firmware","url":"https://con-man.company.com/api/v1/file-732e844b","updated":"2017-07-25"}]}
  </code></pre>