Jak serializować dane formularza w JS
const serialize = (formElement) => {
let data = new FormData(formElement);
let obj = {};
for (let [key, value] of data) {
obj[key] = value;
}
return obj;
}
Adorable Antelope