skip to Main Content

How to handle a nested JSON?

I have a problem. I have a nested JSON file: json_data = ''' { "appVersion": "", "device": { "model": "" }, "bef": { "catalog": "" }, "data": [ { "timestamp": "", "label": "", "category": "" } ] } I would…

VIEW QUESTION

Python to format and create a nested JSON file

I am using pandas "to_json" option to generate some JSON files after filtering DF. The output of these comes as below: [{"time":1677287760000,"x":0.001,"y":0.001,"z":0.0},{"time":1677632400000,"x":0.0,"y":0.0,"z":0.0},{"time":1677636000000,"x":0.0,"y":0.0,"z":0.0},{"time":1677639600000,"x":0.0,"y":0.0,"z":0.0}] and [{"dt":20,"count":6},{"dt":23,"count":9},{"dt":11,"count":7},{"dt":2,"count":16},{"dt":17,"count":1},{"dt":20,"count":6}] I am looking for options to create a JSON file in python which will hold both…

VIEW QUESTION
Back To Top
Search