Python Forum
Nested json to excel using python - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: Nested json to excel using python (/thread-19096.html)



Nested json to excel using python - unknown - Jun-13-2019

Hi,


I am converting nested json to excel in below format.
My nested object is not populating in seperate table.Can you please help.
I am using json_load.

json data:
Output:
{ "domain": { "Switch": [ { "id": "1", "Config": { "details": { "version": "0.0.1", "description": "server software" } }, "Repo": { "location": "N/A" }, "Model": { "modelid": "1233445", "modelname": "N/A" } } ], "zone": [ { "zonename": "abc", "Time": { "setting": "UTC" } } ] }, "network": { "config": [ { "sip": { "log_ip": "1.1.1.1" }, "dns": { "ip": "1.2.3.4" }, "ip": "1.2.3.4" } ] }, "model": "xyz" }
Output format in excel,
Output:
-------------------------| domain | -------------------------| model | serial | ----------|--------------| xyz | 121423546| ----------|-------------- ---------------------------------------------| switch | ---------------------------------------------| id | modelid | modelname | ---------|--------------------|--------------| 1 | test | n/a | ---------------------------------------------| -----------------------| config | -----------------------| details | -----------------------| version | description | ---------|-------------| 0.0.1 |server s/w | -----------------------|



RE: Nested json to excel using python - buran - Jun-13-2019

Please, post your code in python tags