You can't rewrite the project file.
The most common solution is to save the new JSON info in Local Storage. Then, when your game starts, check Local Storage - if it contains new keyconfig, load it from Local Storage. If not - use AJAX to request the default values from JSON file.