0

I have serialized form in string such as:

"name=Michael&surname=Davies&multiple=selection1&multiple=selection3"

How can I convert this string to object and then change values in form, or directly change values in form with this string? I have several forms in one html page and each string represent values in one form.

Thank you.

Trevor Reid
  • 2,914
  • 3
  • 25
  • 42
LUKE
  • 126
  • 10

1 Answers1

0

Try using below to get an array. Then u can put them in to a JSON object by traversing through the array. May be not the best solution.

$("#form").serializeArray();
Anjana
  • 878
  • 1
  • 5
  • 13