Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

form data to json

function formDataToJson(formData){
    let json = {};
    if(!(formData instanceof FormData)) return json;
    formData.forEach((value,key)=>{
        json[key] = value;
    });
    return json;
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #form #data #json
ADD COMMENT
Topic
Name
9+2 =