title: How do I parse this multi nested ndjson file in python?
body: <p>My goal is to convert all of the keys into a dataset where I can convert it into a csv.</p>
  <p>df23 = pd.json_normalize(
  df22,
  record_path=[&quot;benefitBalance&quot;],
  meta=[
  'coding',
  [&quot;benefitBalance&quot;,&quot;type&quot;],
  [&quot;benefitBalance&quot;,&quot;display&quot;],
  ]
  )</p>
  <p>This is the ndjson file that I am trying to parse. I don't think I am using pd.json_normalize correctly. Below is the json file that I am trying to parse. This is just one  column of 25 large columns. My main goal is to be able to iterate over all columns. But each column has different length</p>
  <pre><code>[
     {
        &quot;category&quot;: {
           &quot;coding&quot;: [
              {
                 &quot;code&quot;: &quot;1&quot;,
                 &quot;display&quot;: &quot;Medical Care&quot;,
                 &quot;system&quot;: &quot;http://terminology.hl7.org/CodeSystem/ex-benefitcategory&quot;
              }
           ]
        },
        &quot;financial&quot;: [
           {
              &quot;type&quot;: {
                 &quot;coding&quot;: [
                    {
                       &quot;code&quot;: &quot;https://bluebutton.cms.gov/resources/variables/carr_clm_cash_ddctbl_apld_amt&quot;,
                       &quot;display&quot;: &quot;Carrier Claim Cash Deductible Applied Amount (sum of all line-level deductible amounts)&quot;,
                       &quot;system&quot;: &quot;https://bluebutton.cms.gov/resources/codesystem/benefit-balance&quot;
                    }
                 ]
              },
              &quot;usedMoney&quot;: {
                 &quot;currency&quot;: &quot;USD&quot;,
                 &quot;value&quot;: 0
              }
           },
           {
              &quot;type&quot;: {
                 &quot;coding&quot;: [
                    {
                       &quot;code&quot;: &quot;https://bluebutton.cms.gov/resources/variables/nch_clm_prvdr_pmt_amt&quot;,
                       &quot;display&quot;: &quot;NCH Claim Provider Payment Amount&quot;,
                       &quot;system&quot;: &quot;https://bluebutton.cms.gov/resources/codesystem/benefit-balance&quot;
                    }
                 ]
              },
              &quot;usedMoney&quot;: {
                 &quot;currency&quot;: &quot;USD&quot;,
                 &quot;value&quot;: 70.08
              }
           },
           {
              &quot;type&quot;: {
                 &quot;coding&quot;: [
                    {
                       &quot;code&quot;: &quot;https://bluebutton.cms.gov/resources/variables/nch_clm_bene_pmt_amt&quot;,
                       &quot;display&quot;: &quot;NCH Claim Payment Amount to Beneficiary&quot;,
                       &quot;system&quot;: &quot;https://bluebutton.cms.gov/resources/codesystem/benefit-balance&quot;
                    }
                 ]
              },
              &quot;usedMoney&quot;: {
                 &quot;currency&quot;: &quot;USD&quot;,
                 &quot;value&quot;: 0
              }
           },
           {
              &quot;type&quot;: {
                 &quot;coding&quot;: [
                    {
                       &quot;code&quot;: &quot;https://bluebutton.cms.gov/resources/variables/nch_carr_clm_sbmtd_chrg_amt&quot;,
                       &quot;display&quot;: &quot;NCH Carrier Claim Submitted Charge Amount (sum of all line-level submitted charges)&quot;,
                       &quot;system&quot;: &quot;https://bluebutton.cms.gov/resources/codesystem/benefit-balance&quot;
                    }
                 ]
              },
              &quot;usedMoney&quot;: {
                 &quot;currency&quot;: &quot;USD&quot;,
                 &quot;value&quot;: 231
              }
           },
           {
              &quot;type&quot;: {
                 &quot;coding&quot;: [
                    {
                       &quot;code&quot;: &quot;https://bluebutton.cms.gov/resources/variables/nch_carr_clm_alowd_amt&quot;,
                       &quot;display&quot;: &quot;NCH Carrier Claim Allowed Charge Amount (sum of all line-level allowed charges)&quot;,
                       &quot;system&quot;: &quot;https://bluebutton.cms.gov/resources/codesystem/benefit-balance&quot;
                    }
                 ]
              },
              &quot;usedMoney&quot;: {
                 &quot;currency&quot;: &quot;USD&quot;,
                 &quot;value&quot;: 86.75
              }
           }
        ]
     }
  ]
  </code></pre>
  <p>Desired column names:</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>category.coding.0.code</th>
  <th>category.coding.0.display</th>
  <th>category.coding</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>data</td>
  <td>384</td>
  <td>648</td>
  </tr>
  </tbody>
  </table>
  </div>