title: Downloading JSON data from webpage?
body: <p>I am trying to download data from the iex api using python and currently I am to the point where i get the data, but now i want to format it.</p>
  
  <p>basically i get a lot of data which i do not care about, I just want to have the "float" section.</p>
  
  <p>The data should look like this:</p>
  
  <p>Ticker, Float,</p>
  
  <p>AAPL, 4700000000, (something like that)</p>
  
  <p>The code I am using:</p>
  
  <pre><code>import requests 
  
  url = "https://api.iextrading.com/1.0/stock/aapl/stats" 
  
  response = requests.get(url).json()
  
  print (response)
  </code></pre>
  
  <p>I would be verry happy if someone could explain me how to do this.</p>
  
  <p>Kind regards</p>
  
  <p>Right now I have the code:</p>
  
  <pre><code>import requests 
  
  url = "https://api.iextrading.com/1.0/stock/aapl/stats" 
  
  response = requests.get(url).json()
  
  data = (response['symbol'], response['float'])
  
  import json filename='resp.json'
  
  with open(filename, 'a+') as outfile:
      json.dump(data, outfile, indent=4)
  
  import requests 
  
  url = "https://api.iextrading.com/1.0/stock/tsla/stats" 
  
  response = requests.get(url).json()
  
  data = (response['symbol'], response['float'])
  
  import json filename='resp.json'
  
  with open(filename, 'a+') as outfile:
      json.dump(data, outfile, indent=4)
  </code></pre>
  
  <p>I would like the data to show as:</p>
  
  <p>Ticker, Float,</p>
  
  <p>AAPL, 4700000000,</p>
  
  <p>TSLA, 1700000000,</p>
  
  <p>(Ticker and float do not neceserally have to be placed above, i could do that myself in excel power query anyway).</p>