title: How to access nested field in JSON with address given in Python
body: <p>What is the simplest way to access a field in json data if entire key-address is given in a list.</p>
  
  <p>E.g., Given "data" a json object and <code>["context", "body", "gk"]</code> as the list of keys, i.e. </p>
  
  <pre><code>resultant value = data["context"]["body"]["gk"]
  </code></pre>
  
  <p>In this, list of keys can be of any length.</p>
  
  <p>Is there any simpler approach to this?</p>
  
  <pre><code>target = json.loads(data)
  for elem in key_list:
      target = target[elem]
  print target
  </code></pre>