title: List indices must be integers and not dict
body: <p>My json file look likes this and I'm trying to access the data from it.</p>
  
  <pre><code>{
  "stats": [
      {
          "id": 7,
          "name": "WarL0cK",
          "position": "toplane",
          "playerSlug": "warl0ck",
          "team": "BKT",
          "gamesPlayed": 6,
          "kda": 1.5,
          "kills": 12,
          "deaths": 20,
          "assists": 18,
          "killParticipation": 0.6666666666666666,
          "csPerMin": 5.917136743824159,
          "cs": 1014,
          "minutesPlayed": 171,
          "teamSlug": "bangkok-titans"
      },
  </code></pre>
  
  <p>And my script is mentioned below. When i run it it gives the error:list indices must be integers, not dict </p>
  
  <pre><code>import csv
  import json
  
  json_file='PlayerStats.json'
  with open(json_file, 'r') as json_data:
  x = json.load(json_data)
  
  f = csv.writer(open("playerstats.csv", "w"))
  
  f.writerow(["stats", "id", "name", "position","playerSlug", "team",     "gamesPlayed", "kda", "kills", "deaths", "assists", "killParticipation", "csPerMin", "cs", "minutesPlayed", "teamSlug"])
  
  stats=x["stats"]
  for key in x["stats"]:
      f.writerow([ 
              x["stats"][key]["id"], 
              x["stats"][key]["name"],
              x["stats"][key]["position"],
              x["stats"][key]["playerSlug"],
              x["stats"][key]["team"],
              x["stats"][key]["gamesPlayed"],
              x["stats"][key]["kda"],
              x["stats"][key]["kills"],
              x["stats"][key]["deaths"],
              x["stats"][key]["assists"],
              x["stats"][key]["killParticipation"],
              x["stats"][key]["csPerMin"],
              x["stats"][key]["cs"],
              x["stats"][key]["minutesPlayed"],
              x["stats"][key]["teamSlug"]])    
  </code></pre>
  
  <p>I think there is some problem in parsing the list from dictionaries. Please help.</p>