serialize-html-form
v1.0.0
Published
Obtain an object from a HTML Element Form
Downloads
35
Maintainers
Readme
Serialize Form
Obtain a serialized object of certain form passing the id as an argument:
serializeForm('my-form');
Document body:
<form id="my-form">
<input type="text" name="user.name" value="Antonio" />
<input type="text" name="user.email.primary" />
<input type="text" name="business" />
</form>
Output:
{
user: {
name: 'Antonio',
email: {
primary: ''
}
},
business: ''
};