title: Error message while parsing json in Python
body: <p>Am using below code for parsing json coming from url. But I am getting this  error:</p>
  
  <pre><code>ex= data['e']
  TypeError: list indices must be integers or slices, not str
  </code></pre>
  
  <p>Here is my code:</p>
  
  <pre><code>html = urlopen("http://localhost:8080/messenger/webapi/myresource")
  content = html.read()
  data = json.loads(content.decode("utf8"))
  ex = data['e']
  print(ex)
  </code></pre>
  
  <p>And here is the JSON:</p>
  
  <pre><code>[  
    {  
      "c":"-1.00",
      "c_fix":"-1.00",
      "ccol":"chr",
      "cp":"-0.37",
      "cp_fix":"-0.37",
      "e":"NSE",
      "id":"13564339",
      "l":"269.50",
      "l_cur":"&amp;#8377;269.50",
      "l_fix":"269.50",
      "lt":"Feb 17, 3:56PM GMT+5:30",
      "lt_dts":"2017-02-17T15:56:16Z",
      "ltt":"3:56PM GMT+5:30",
      "pcls_fix":"270.5",
      "s":"0",
      "t":"SBIN"
    }
  ]
  </code></pre>