-
jquery.serializeJSON
Serialize an HTML Form to a JavaScript Object, supporting nested attributes and arrays.
-
SurveyJS
Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
$('form').submit(function(){ var obj = $('form').serializeJSON(); $.ajax({ type: 'POST', url: 'http://192.168.52.166:6000/api/2/users/login/', dataType: 'json', data: JSON.stringify(obj), contentType : 'application/json', success: function(data) { alert(data) } }); i am using SerializeJSON library to serealize the form data to json.