How can I convert query string or JSON object map to single JSON object with jQuery?

后端 未结 5 758
忘掉有多难
忘掉有多难 2020-12-09 14:13

For this example, assume that I have a list of months in a form, each with a checkbox next to them. I\'m looking for help on doing either of two things:

  1. Conver
5条回答
  •  隐瞒了意图╮
    2020-12-09 14:47

    You can also use the parseQuery plugin to create an object from the serialized elements.

    var contact = $.parseQuery($("#step1 *").serialize());
    

提交回复
热议问题