Essetee's Website

import json

PATH = "PATH_TO_YOUR_JSON-FILE"

# Load the json file
with open('PATH/data.json', 'r', encoding='utf-8') as f:
    data = json.load(f)

# Sort the json file on the field name
data_sorted = sorted(data, key=lambda x: x['name'])

# Save the sorted file to a new file sorted.json
with open('PATH/sorted.json', 'w', encoding='utf-8') as f:
    json.dump(data_sorted, f, ensure_ascii=False, indent=2)