title: TypeError: string indices must be integers // working with JSON as dict in python
body: <p>Okay, so I've been banging my head on this for the last 2 days, with no real progress. I am a beginner with python and coding in general, but this is the first issue I haven't been able to solve myself.</p>
  
  <p>So I have this long file with JSON formatting with about 7000 entries from the youtubeapi. 
  right now I want to have a short script to print certain info ('videoId') for a certain dictionary key (refered to as 'key'): </p>
  
  <p><strong>My script</strong>:</p>
  
  <pre><code>import json
  
  f = open ('path file.txt', 'r')
  s = f.read()
  
  trailers = json.loads(s)
  print(trailers['key']['Items']['id']['videoId'])
  # print(trailers['key']['videoId'] gives same response
  </code></pre>
  
  <p><strong>Error:</strong></p>
  
  <pre><code>print(trailers['key']['Items']['id']['videoId'])
  TypeError: string indices must be integers
  </code></pre>
  
  <p>It does work when I want to print all the information for the dictionary key:
  This script <strong>works</strong> </p>
  
  <pre><code>import json
  
  f = open ('path file.txt', 'r')
  s = f.read()
  
  trailers = json.loads(s)
  print(trailers['key'])
  </code></pre>
  
  <p>Also <em>print(type(trailers))</em> results in <em>class 'dict'</em>, as it's supposed to.</p>
  
  <p>My JSON File is formatted like this and is from the youtube API, youtube#searchListResponse. </p>
  
  <pre><code>{
   "kind": "youtube#searchListResponse",
   "etag": "",
   "nextPageToken": "",
   "regionCode": "",
   "pageInfo": {
    "totalResults": 1000000,
    "resultsPerPage": 1
   },
   "items": [
    {
     "kind": "youtube#searchResult",
     "etag": "",
     "id": {
      "kind": "youtube#video",
      "videoId": ""
     },
     "snippet": {
      "publishedAt": "",
      "channelId": "",
      "title": "",
      "description": "",
      "thumbnails": {
       "default": {
        "url": "",
        "width": 120,
        "height": 90
       },
       "medium": {
        "url": "",
        "width": 320,
        "height": 180
       },
       "high": {
        "url": "",
        "width": 480,
        "height": 360
       }
      },
      "channelTitle": "",
      "liveBroadcastContent": "none"
     }
    }
   ]
  }
  </code></pre>
  
  <p>What other information is needed to be given for you to understand the problem?</p>