JSON is typically not used for storing the actual application state in... but more for storing and retrieving it from a file or service.
What you would do is load it when the program starts into something your application would use while it runs, and then on exit you would save it to the JSON. While running you would just modify your in memory data structure. partly because I/O operations are slow and can impact your game flow.
I've not tested the contents of this video out, but looks like it is what you are trying to do.
https://www.youtube.com/watch?v=L9Zekkb4ZXc
To line it up with my above comment he talks about loading and saving from Godot's dictionary type.