jqueryjquery-bbq

In jQuery/JavaScript, how do I deserialize a string of form values that have been converted using "form.serialize"


I am surprised at how much difficulty I am having with this.

I am using form.serialize to serialize a form to a string for submission using .ajax. I am also adding this string value to a hash, which I am using to manage state for enablement of the forward and back buttons.

My problem is, I need to get at these values from the serialized form via javascript, and I can't figure out how to do it. I can get the string, but it's basically a query string. Note that it is NOT ACTUALLY the query string, it is just formatted as a query string.


Solution

  • Have you tried JQuery.deserialize plugin? https://github.com/kflorence/jquery-deserialize