I'd like to be able to create a javascript object from my html form and am wondering if there's a good way to do this using jquery. I guess what i'm looking for is something similar to $.serialize, but which would result in a map instead of a string.
<form>
<input type="text" name="foo1" value="bar1" />
<input type="text" name="foo2" value="bar2" />
</form>
desired result:
{ foo1:"bar1", foo2:"bar2" }