I'm trying to parse nested json results.
data = {
"results": [
        {
            "components": [
                {
                    "times": {
                            "periods": [
                                {
                                    "fromDayOfWeek": 0,
                                    "fromHour": 12,
                                    "fromMinute": 0,
                                    "toDayOfWeek": 4,
                                    "toHour": 21,
                                    "toMinute": 0,
                                    "id": 156589,
                                    "periodId": 20855
                                }
                            ],
                        }
                    }
                ],
            }
        ],
    }
I can get to and create dataframes for "results" and "components" lists, but cannot get to "periods" due to the "times" dict. So far I have this:
df = pd.json_normalize(data, record_path = ['results','components'])
Need a separate "periods" dataframe with the included column names and values. Would appreciate your help on this. Thank you!
 
    