0

I have a JSON flow file that I need to convert to an excel file within my code. My problem occurs because my JSON flow file has a nested list that then contains other items.

example_json_flow = {
    "flows": [
        {
            "item1": "item1 text example",
        },
        {
            "item2": 20,
        }
    ]
}

I've looked at this question and that method seems to be the "normal" way to do it and what most questions are advertising, but it does not account for nested list items. This solution is what is offered in most questions related to this issue. But it puts everything in one single column in excel, which is not what I am looking for. The method that is explained uses pandas as seen below

df = pandas.read_json(self.open_file_browser_json())
df.to_excel("testing_this.xlsx", index=False)
Luke
  • 138
  • 2
  • 11
  • In what format do you want to store this json? Should `item1` and `item2` be column labels? or values in `flows` column? – cottontail Mar 16 '23 at 15:21

0 Answers0