How to save values to json file?

I see. Good to know actually.

Have you seen this thread yet? A few other options are covered there.