title: How to resolve TypeError: string indices must be integers
body: <p>i'm trying to access specific json data and below is the code. im using python 2.7. however it come out with error <strong>TypeError: string indices must be integers:</strong></p>
  
  <pre><code>http = win32com.client.Dispatch('MSXML2.XMLHTTP.6.0')
  http.open('POST', 'url', False, username, password)
  http.setRequestHeader("Content-type"    , "text/json"             )
  http.setRequestHeader("User-Agent"      , "Your User Agent String")
  http.setRequestHeader("Accept-Encoding" , "gzip, deflate"         )
  http.setRequestHeader("Content-Encoding", "gzip, deflate"         )
  global data
  http.send(json)
  
  global data
  data = http.responseText
  #data=data.split("{}{}") -try to make json data print nicely but failed.
  print data['responses'][0]['status']
  </code></pre>
  
  <hr>
  
  <p>my json data is as below</p>
  
  <pre><code>{
      "responses": [
          {
              "tran_id": "1234",
              "UUID": "122262d7-85f8-4e53-af98-865627cb82cb",
              "status": "success",
              "messages": [],
              "result_params": {
                  "record_count": "1"
              },
              "result_table": [
                  {
                      "id": "101160766",
                      "rev": "13",
                      "hierarchy_id": "F80005AF46FF0000B5EA6FE06078159E80",
                      "is_current": "1"}}
  </code></pre>
  
  <p>,</p>