Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- c#!/usr/bin/python3.6
- import json
- # import old json
- with open("1.json") as foo:
- data = json.load(foo)
- # copy contents to new list of dicts
- new_list = []
- for thing in data:
- new_list.append(thing)
- # export new list of dicts to json
- with open("2.json", 'w') as bar:
- json.dump(new_list, bar)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement