title: How to parse json file containing list inside a section in python?
body: <p>I have a smaple.json as follows:</p>
  
  <pre><code>{"Detail":[
      {
      "DocType":"txt",
      "Name":"hello.txt",
      }
      ]}
  </code></pre>
  
  <p>I need to have the value aginst the "Name" Field. i tried in my script as follows:</p>
  
  <pre><code>file="c:/sample.json"
  for list in file:
      if (str(list['Detail'])=='None'):
           print("Do nothing")
       else:
           ana = list['Detail']
           val =  (str(ana)[1:-1])
           print val
           print val['Name']
  </code></pre>
  
  <p>and i get output as : </p>
  
  <pre><code>  {"DocType":"txt","Name":"hello.txt"} 
    error:print (ana['Name'])
    TypeError: string indices must be integers
  </code></pre>
  
  <p>So what am i doing wrong how shall i get the "Name" field details.</p>