1.0.0 • Published 4 years ago
serialize-html-form v1.0.0
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: ''
};
1.0.0
4 years ago