title: Flattening nested json file with pandas json.normalize()
body: <p>I have a json file that I can put into data frames, but some of the key values pairs are nested like so</p>
  <pre><code>{&quot;obj&quot;:[&quot;id&quot;{ &quot;k1&quot;:v1}, 
  
  &quot;kA&quot;:value_a, 
  
  kD:{&quot;D&quot;:vD},
  
  &quot;listOfKeyVal&quot;[
  {
  
  &quot;k1&quot;:&quot;v1&quot;,
  &quot;k2&quot;:&quot;v2&quot;
  &quot;k3&quot;:&quot;v3&quot;,
  &quot;k4&quot;:&quot;v4&quot;
  }
  ],
  
  &quot;kb&quot;:&quot;Vb&quot;,
  
  &quot;kc&quot;:vc&quot;
  ]
  }
  </code></pre>
  <p>I opened the file using json.load, and am able to normalize the object with</p>
  <pre><code>rdf=pd.json_normalize(jobj)
  </code></pre>
  <p>However, while the rest of the elements normalize I am still having trouble with the listOfKeyVal being nested It is a list with one dict object that contains numerous key value pairs. I cannot get it to normalize and flatten along with the other key value pairs. I have tried using the following code</p>
  <pre><code>r1=pd.json_normalize(jobj, record_path=['listOfKeyVal'],
                       meta=[&quot;k1&quot;,
                             &quot;k2&quot;
                             &quot;k3&quot;,
                             &quot;k4&quot;],record_prefix=' ',errors='ignore' )
  </code></pre>
  <p>When I run this I get a Keyerror for 'listOfKeyVal', and all of the documentation covers lists with numerous dictionaries not a list with one braced object with numerous key value pairs. Any guidance would be greatly appreciated.</p>