Save html form data to json file on my host with javascript

in this url:
I need to save name and email that user write in inputs of subsciption modal as a json file on my Godaddy host (Cpanel).
How can I do this? Should I get access or do permission things for this action on my Cpanel?