Python Forum
Nested json to excel using python
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Nested json to excel using python
#1
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 | -----------------------|
Reply
#2
Please, post your code in python tags
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  [split] Parse Nested JSON String in Python mmm07 4 1,526 Mar-28-2023, 06:07 PM
Last Post: snippsat
  Read nested data from JSON - Getting an error marlonbown 5 1,367 Nov-23-2022, 03:51 PM
Last Post: snippsat
  Python Split json into separate json based on node value CzarR 1 5,594 Jul-08-2022, 07:55 PM
Last Post: Larz60+
  Converting cells in excel to JSON format desmondtay 4 1,749 May-23-2022, 10:31 AM
Last Post: Larz60+
  Convert nested sample json api data into csv in python shantanu97 3 2,815 May-21-2022, 01:30 PM
Last Post: deanhystad
  Convert python dataframe to nested json kat417 1 6,340 Mar-18-2022, 09:14 PM
Last Post: kat417
  Problem with nested JSON Kalet 7 2,794 Dec-09-2021, 11:13 PM
Last Post: Gribouillis
  excel - json jmabrito 23 6,490 Mar-02-2021, 10:11 PM
Last Post: jmabrito
  JSON response from REST service get nested value nl2ttl 2 2,533 Nov-30-2020, 09:34 PM
Last Post: nl2ttl
  JSON -> CSV conversion help! *I think Nested JSON* BrandonKastning 4 3,338 Apr-19-2020, 05:18 AM
Last Post: BrandonKastning

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020