title: TypeError: list indices must be integers, not str,while parsing json
body: <p>After submitting a request I have received the following json back:</p>
  
  <pre><code>{"type": [
  {"ID": "all", "count": 1, "references": [
      { "id": "Boston,MA,02118", "text": "Boston,MA,02118", "val": "Boston,MA,02118", "type": 1 ,"zip": "02118","city": "Boston","state": "MA","lt": "42.3369","lg": "-71.0637","s": ""}
  ] }
  ] } 
  </code></pre>
  
  <p>I captured the response in variable j and loaded it as follows, </p>
  
  <pre><code>l = json.loads(j)
  </code></pre>
  
  <p>Now I have:</p>
  
  <pre><code>&gt;&gt;&gt; type(l)
  &lt;type 'dict'&gt;
  &gt;&gt;&gt; l['type']['references']
  Traceback (most recent call last):
    File "C:\PyCharm\helpers\pydev\pydevd_exec.py", line 3, in Exec
      exec exp in global_vars, local_vars
    File "&lt;input&gt;", line 1, in &lt;module&gt;
  TypeError: list indices must be integers, not str
  </code></pre>
  
  <p>What am I doing wrong? </p>