[jQuery] Equivalent of Dojo/Dijit Form.setValues() & Form.getValues()?
I'm curious if anyone know of plugins that provide equivalent
functionality to the JSON form binding capabilities in Dojo?
serializeToArray() doesn't quite do what I'm looking for. To provide
an example, I'd like to have something like:
<form>
<input type="text" name="username"/>
<input type="text" name="details.firstName"/>
<input type="text" name="details.lastName"/>
</form>
that serializes to a structure like:
{
username: '...',
details: {
firstName: '...',
lastName: '...'
}
}
And likewise, I'd like to be able to do the same with regard to
deserializing JSON and binding to the form. Dojo's implementation is
pretty close to what I'm looking for, but I'm not crazy about it being
tied into dijit and having to bring all that along just to get a good
form<->JSON serialization mechanism.
Might just build it myself, but thought I'd check first :)