How to save data to a JSON file and read from it

The answer above is what I would suggest. One addition is you would have to write it back to the same file using Bundle.main, which I think the answers above missed.