title: Pythonic way to iterate through json file
body: <p>I have a .json file which has a similar structure like this:</p>
  <pre><code>{
    &quot;cars&quot;: [
      {
      &quot;FIAT&quot;: [
        {&quot;model_id&quot;: 153},
        {&quot;model_id&quot;: 194}
      ]
      },
      {
      &quot;AUDI&quot;: [
        {&quot;model_id&quot;: 261}
      ]
      },
      {
      &quot;BMW&quot;: [
        {&quot;model_id&quot;: 264}
      ]
      }
    ]
  }
  </code></pre>
  <p>My end goal is to retrieve the following:</p>
  <pre><code>      {&quot;model_id&quot;: 153},
        {&quot;model_id&quot;: 194},
        {&quot;model_id&quot;: 261},
        {&quot;model_id&quot;: 264}
  
  </code></pre>
  <p>Currently my code which gets me this result is this:</p>
  <pre><code>    for cars in dir['cars']:
          for brand in cars:
              for model in cars[brand]:
                  print(model)
  </code></pre>
  <p>My question is that do we have a better way to access these details? I know that itertools.product is used to replace nested for loops, but can it be applied in this scenario?</p>