title: How can I read json file to collect the attribute values in different companies?
body: <p>As the question explained above, I faced the difficulty of reading json file to collect attribute values from the company database in Python, and would like to store the values into numpy.ndarray form. What I wanna do is to read through
  all the companies numbering and select its own values.</p>
  <p>For example:</p>
  <pre><code>&quot;0000059745&quot;: {
          &quot;Income&quot;: 5928375,
          &quot;Assets&quot;: 958273479,
  }
  
  &quot;0000212498&quot;: &quot;Empty dictionary.&quot;,
      &quot;0000310826&quot;: {
          &quot;Income&quot;: 1928474,
          &quot;Assets&quot;: 2938479,
  }
  </code></pre>
  <p>However, the relevant questions I checked on other sources were simply basic instruction of teaching people how to read json file with the same name for a single company, but did not explicitly have the similar problem as I had.</p>
  <p>For instance:</p>
  <pre><code>&quot;comp1&quot;: {
          &quot;Income&quot;: 5928375,
          &quot;Assets&quot;: 958273479,
  }
  
  &quot;comp1&quot;: &quot;Empty dictionary.&quot;,
      &quot;comp1&quot;: {
          &quot;Income&quot;: 1928474,
          &quot;Assets&quot;: 2938479,
  }
  </code></pre>
  <p>Hence, what I would like to do it is something like below:</p>
  <pre><code>
  with open(&quot;input/company_data.json&quot;) as f:
  
  for comp in companies[&quot;number&quot;]:
      for var in company_variables[&quot;Assets&quot;][&quot;Income&quot;]:
      // Storing both Assets and Income attribute values into dataNdArr as numpy.ndaarray type
      dataNdArr = var
  </code></pre>
  <p>I hope someone could help me with further improving this deeper level of reading json file problem.
  Thank you.</p>