title: How to create a sales table from JSON files using Python
body: <p>I have a JSON file like this and have got troubles generating a table with 
  COLUMNS as Name, number, countrycode(first item in price), currency</p>
  
  <pre><code>{"a": [{"Name": "name1",
    "number": "number1",
    "defaultPrice": {"p": "232", "currency": "CAD"},
    "prices": {"DZ": {"p": "62", "currency": "RMB"},
     "AU": {"p": "73", "currency": "AUD"},
    "lg": "en"}},
   {"Name": "name2",
    "number": "number2",
    "defaultPrice": {"p": "233", "currency": "CAD"},
    "prices": {"DZ": {"p": "63", "currency": "RMB"},
    "US": {"p": "72", "currency": "USD"},
    "Lg": "en"}}]}
  </code></pre>
  
  <p>The problem is that I get traceback just at the parsing:</p>
  
  <pre><code>Traceback (most recent call last):
    File "test.py", line 49, in &lt;module&gt;
      val = ast.literal_eval(mystr)
    File "/anaconda3/lib/python3.7/ast.py", line 46, in literal_eval
      node_or_string = parse(node_or_string, mode='eval')
    File "/anaconda3/lib/python3.7/ast.py", line 35, in parse
      return compile(source, filename, mode, PyCF_ONLY_AST)
    File "&lt;unknown&gt;", line 38
   SyntaxError: unexpected EOF while parsing
  </code></pre>
  
  <p>What I used was </p>
  
  <pre><code>mystr='''
  ....
  '''
  val = ast.literal_eval(mystr)
  val1 = json.loads(json.dumps(val))
  val2 = val1['a'][0]['Name']
  print pd.DataFrame(val2, columns=["Name"])
  </code></pre>
  
  <p>Thanks for any help!!</p>