The FormData object to convert
const formData = new FormData();
formData.append('name', 'John Doe');
formData.append('email', 'john.doe@example.com');
formData.append('hobbies', 'reading');
formData.append('hobbies', 'coding');
const result = formDataToObject(formData);
console.log(result);
/// { name: 'John Doe', email: 'john.doe@example.com', hobbies: ['reading', 'coding'] }
Converts a FormData object to a plain JavaScript object.