var formData= new FormData(form)
JSON.stringify(Object.fromEntries(formData))
function formDataToJson(formData){
let json = {};
if(!(formData instanceof FormData)) return json;
formData.forEach((value,key)=>{
json[key] = value;
});
return json;
}