How to flatten a nested json array?

Here’s a partial solution: First save your data in the same directory as the script as a JSON file called data.json. import json import pandas as pd from pandas.io.json import json_normalize with open(‘data.json’) as json_file: json_data = json.load(json_file) new_data = json_data[‘data’][‘workbooks’] result = json_normalize(new_data, [’embeddedDatasources’, ‘upstreamTables’], [‘projectName’, ‘name’, ‘createdAt’, ‘updatedAt’, ‘owner’, ‘site’], record_prefix=’_’) result Output: … Read more