Sorting out the json file