title: Parsing complex JSON with Python
body: <p>I'm quite new with JSON and Python and trying to work with complex JSON outputs that I'm getting with GET requests. This is one example of JSON output (this is a small part of it but the principle is the same):</p>
  
  <pre><code>{
    "innerSet": [
      {
        "clusterUID": {
          "id": 3585057579401361143
        },
        "rpasState": [
          {
            "rpaUID": {
              "clusterUID": {
                "id": 3585057579401361143
              },
              "rpaNumber": 1
            },
            "status": "OK",
            "repositoryConnectivityStatus": {
              "accessStatus": "OK",
              "multipathingProblems": false
            },
            "remoteRPAsDataLinkStatus": [
              {
                "JsonSubType": "RPAConnectivityStatus",
                "clusterUID": {
                  "id": 2671811049708195677
                },
                "entityType": "RPA",
                "connectivityStatus": "OK",
                "rpaUID": {
                  "clusterUID": {
                    "id": 2671811049708195677
                  },
                  "rpaNumber": 1
                }
              }
            ],
           }
        ]
      }
   ]
  }
  </code></pre>
  
  <p>I trying to find the best way to print a single value. For example, I need the value of "connectivityStatus". Any help will be much appreciated.</p>
  
  <p>I able to pars simple JSON output. I have managed to get the entire innerSet tree: </p>
  
  <pre><code>x = requests.get('website.com)
  d = x.json() print (d['innerSet']) 
  </code></pre>
  
  <p>However, I'not able to go the lower keys. For example, getting the value for "id" key in "clusterUID": </p>
  
  <pre><code>print (d['innerSet']['clusterUID']['id']) 
  </code></pre>
  
  <p>Results in the following error: TypeError: list indices must be integers, not str </p>
  
  <p>Regards,
  Yakir.</p>