title: How to extract values from json which has multiple hierarchies inside using Python
body: <p>Below is the json content, how to extract values for "GBL_ACTIVE_CPU" using python.</p>
  
  <pre><code>{
          "test": "00.00.004",
          "Metric Payload": [
              {
                  "ClassName": "test",
                  "SystemId": "test",
                  "uri": "http://test/testmet",
                  "MetaData": [
                      {
                          "FieldName": "GBL_ACTIVE_CPU",
                          "DataType": "STRING",
                          "Label": "test",
                          "Unit": "string"
                      }
                  ],
                  "Instances": [
                      {
                          "InstanceNo": "0",
                          "GBL_ACTIVE_CPU": "4"
                      }
                  ]
          ]               
  }
  </code></pre>
  
  <p>I tried below code, but doesn't work. Any help is appreciated:</p>
  
  <pre><code>result = json.loads(jsonoutput)
  print(result)
  node = result["Metric Payload"]["Instances"]["GBL_ACTIVE_CPU"]
  print(node)
  </code></pre>
  
  <p>I get below error:</p>
  
  <pre><code>TypeError: list indices must be integers or slices, not str
  </code></pre>