how to update a json file