title: Normalizing Complex Json in python
body: <p>I am trying to normalize json function using pandas but not able to flatten the nested arrays inside json</p>
  
  <p>I have tried this reading one of the example  but it only gives me one record using this code</p>
  
  <pre><code>from pandas.io.json import json_normalize
  data ={
  "id":"001",
      "counties" : [ {"name":"y"},{"name":"X"}], 
  "extendedDescriptionFrench" : "Fromage Brick Petit Gaspesien",
  "brand" : "PETIT GASPESIEN",
  "brandFrench" : "PETIT GASPESIEN",
  "productLife" : "90",
  "digitalAssetFoodservice" : [ {
  "digitalAssetFormatFoodservice" : "JPG",
  "digitalAssetGDTIFoodservice" : "754000000016500000000002167445",
  "digitalAssetImageVersionDateTimeFoodservice" : "2016-06-28T20:06:06.000-04:00",
  "digitalAssetStateFoodservice" : "P"
  }, {
  "digitalAssetFormatFoodservice" : "JPG",
  "digitalAssetGDTIFoodservice" : "754000000016500000000002167597",
  "digitalAssetImageTypeFoodservice" : "M",
  "digitalAssetImageVersionDateTimeFoodservice" : "2016-06-28T20:06:06.000-04:00"
  }, {
  "digitalAssetFormatFoodservice" : "JPG",
  "digitalAssetGDTIFoodservice" : "754000000016500000000002167687",
  "digitalAssetImageTypeFoodservice" : "C",
  "digitalAssetImageVersionDateTimeFoodservice" : "2016-06-28T20:06:06.000-04:00",
  "digitalAssetStateFoodservice" : "C"
  } ]
  }
  
  a=json_normalize(data)
      print(a)
  </code></pre>
  
  <p>Is there anyway to flatten "digitalAssetFoodservice" array into columns.</p>
  
  <p>Here is the output that i am getting
  <a href="https://i.stack.imgur.com/95zCF.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/95zCF.png" alt="Current ouput"></a></p>
  
  <p>And Also what if i have more than one nested array fields</p>