title: Python: TypeError: String indices must be integers while parsing JSON
body: <p>I have written a code to parse through the following json content but I am getting error message as "TypeError: String indices must be integers".<a href="http://i.stack.imgur.com/Y3MBT.png" rel="nofollow">enter image description here</a></p>
  
  <pre><code>import urllib
  import json
  while True:
      url = raw_input('Enter url: ')
      if len(url) &lt; 1 :break
      info = json.loads(urllib.urlopen(url).read())
      counts = 0
      total = 0
      print info
      for value in info:
          if value['count']:
              e = value['count']
              for value in e.itervalues():
                  print value
  </code></pre>
  
  <p>JSON</p>
  
  <pre><code>   {
    "comments":[
      {
        "name":"Leven",
        "count":100
      },
      {
        "name":"Mahdiya",
        "count":97
      },
      {
        "name":"Ajayraj",
        "count":87
      },
      {
        "name":"Lillian",
        "count":86
      },
      {
        "name":"Aon",
        "count":86
      },
      {
        "name":"Ruaraidh",
        "count":78
      },
      {
        "name":"Gursees",
        "count":75
      },
      {
        "name":"Emmanuel",
        "count":74
      },
      {
        "name":"Christy",
        "count":72
      },
      {
        "name":"Annoushka",
        "count":72
      },
      {
        "name":"Inara",
        "count":72
      },
      {
        "name":"Caite",
        "count":70
      },
      {
        "name":"Rosangel",
        "count":70
      },
      {
        "name":"Iana",
        "count":66
      },
      {
        "name":"Anise",
        "count":66
      },
      {
        "name":"Jaosha",
        "count":65
      },
      {
        "name":"Cadyn",
        "count":65
      },
      {
        "name":"Edward",
        "count":63
      },
      {
        "name":"Charlotte",
        "count":61
      },
      {
        "name":"Sammy",
        "count":60
      },
      {
        "name":"Zarran",
        "count":60
      },
      {
        "name":"Rowen",
        "count":59
      },
      {
        "name":"Stanislaw",
        "count":59
      },
      {
        "name":"Maighdlin",
        "count":57
      },
      {
        "name":"Connan",
        "count":56
      },
      {
        "name":"Warrick",
        "count":54
      },
      {
        "name":"Diya",
        "count":52
      },
      {
        "name":"Lawson",
        "count":52
      },
      {
        "name":"Wu",
        "count":51
      },
      {
        "name":"Irmak",
        "count":47
      },
      {
        "name":"Emilija",
        "count":47
      },
      {
        "name":"Kayda",
        "count":41
      },
      {
        "name":"Ellenor",
        "count":41
      },
      {
        "name":"Kyra",
        "count":41
      },
      {
        "name":"Nikita",
        "count":38
      },
      {
        "name":"Kaelah",
        "count":35
      },
      {
        "name":"Meko",
        "count":32
      },
      {
        "name":"Marissa",
        "count":31
      },
      {
        "name":"Ayat",
        "count":24
      },
      {
        "name":"Sali",
        "count":19
      },
      {
        "name":"Hashem",
        "count":19
      },
      {
        "name":"Tygan",
        "count":18
      },
      {
        "name":"Rioden",
        "count":17
      },
      {
        "name":"Cruiz",
        "count":16
      },
      {
        "name":"Caoilfinn",
        "count":13
      },
      {
        "name":"Ewen",
        "count":8
      },
      {
        "name":"Baighley",
        "count":7
      },
      {
        "name":"Ramone",
        "count":1
      },
      {
        "name":"Kyran",
        "count":1
      },
      {
        "name":"Noelani",
        "count":1
      }
    ]
  }
  </code></pre>
  
  <p>Tell me a way to add all the values in the <strong>count</strong> (Json content)</p>