How to iterate through this nested json array with python
<p>So I made an API call to JIRA to get the list of all the issues. It returns something like this: </p>

<pre><code>{
 issues: [
  {
    fields: {
         description: 
         summary: 
         creator:
         reporter:
         priority:
       }
     }
   ]
</code></pre>

<p>and I'm trying to get to what's inside <code>fields</code>. 
Here's what I have: </p>

<p><code>response =  requests.get(url + '/search?jql=resolution%20=%20Unresolved%20order%20by%20priority%20DESC,updated%20DESC', auth=auth).json()</code></p>

<p>and then : </p>

<p><code>response['issues']</code> works. But I can't find a way to access <code>fields</code> and then the elements inside it. I thought about iterating through but not sure if there's a simpler solution. </p>

<p>My understanding is that response[issues] is a list and I know how to access each element of it <code>response[issues][0]</code> but how to access the object nested inside the list? (still researching on it -- might find an answer) </p>

<p>if you look at your json it's an array to a hash or list to dict. To get  fields you'd just call the first array element and the key.</p>

<p><code>response[issues][0][fields]</code></p>

python json api jira jira-rest-api