title: Looping throuh json
body: <p>I'am trying to add json data to the lists. <br>
  Json looks like this:</p>
  <pre><code>[{'genus': 'Musa', 'name': 'Banana', 'id': 1, 'family': 'Musaceae', 'order': 'Zingiberales', 'nutritions': {'carbohydrates': 22, 'protein': 1, 'fat': 0.2, 'calories': 96, 'sugar': 17.2}}]
  </code></pre>
  <p>But with my function, i can append to lists only those objects:</p>
  <pre><code>genus': 'Musa', 'name': 'Banana', 'id': 1, 'family': 'Musaceae', 'order': 'Zingiberales'
  </code></pre>
  <p>Can't get anything from 'nutritions'. <br>
  Adding code:</p>
  <pre><code>import requests
  import json
  
  
  name = []
  id = []
  family = []
  genus = []
  order = []
  carbohydrates = []
  protein = []
  fat = []
  calories = []
  sugar = []
  
  def scrape_all_fruits():
      data_list = []
      try:
          for ID in range(1, 10):
              url = f'https://www.fruityvice.com/api/fruit/{ID}'
              response = requests.get(url)
              data = response.json()
              data_list.append(data)
      except:
          pass
      return data_list
  
  
  def listify(fruit_stats):
      alist = json.dumps(scrape_all_fruits())
      jsonSTr = json.loads(alist)
      for i in jsonSTr:
          try:
              name.append(i['name'])
              id.append(i['id'])
              family.append(i['family'])
              genus.append(i['genus'])
              order.append(i['order'])
              carbohydrates.append(i['carbohydrates'])
              protein.append(i['protein'])
              # fat.append(i['fat'])
              calories.append(i['calories'])
              sugar.append(i['sugar'])
              for nutrs in i:
                  fat.append(nutrs.a['fat'])
          except:
              pass
      return fruit_stats
  
  
  print(listify(fat))
  </code></pre>
  <p>Can anyone explain to me what iam doing wrong ? Thank You in advance.</p>