Get data as object after form submit in jQuery
I am building a website that can send custom data after submission with the below code. $('form').submit((e)=>{ e.preventDefault(); let data = $('form').serializeArray(); console.log(data); $.ajax({ url: 'path/to/submit', type: 'POST', data: data, success: (res) => { console.log(res); } }) }); form {…