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
  • 3,310
  • 4
  • 27
  • 46
LUKE
  • 128
  • 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
  • 903
  • 1
  • 5
  • 13