import json title = input('Title: ') description = input('Description: ') tags = input('Tags: ') gradient = input('Gradient: ') with open('entries.json', 'r') as f: data = json.load(f) data["entries"].append({ "title": title, "description": description, "tags": tags, "gradient": gradient }) with open('entries.json', 'w') as f: json.dump(data, f, ensure_ascii=False, indent=4)