Reformatting the json and writing it to new.json