Query String generated by $.param() include square brackets for array

前端 未结 2 1915
死守一世寂寞
死守一世寂寞 2021-01-15 06:31

I have an object like this:

var queryObject= {
      name: \'Shwetanka\',
      subjects: [\'Mathematics\', \'Physics\', \'Computers\'],
      stream: \'scie         


        
2条回答
  •  不思量自难忘°
    2021-01-15 06:52

    I've found the solution. I just have to pass 'traditional=true' in $.param(queryObject, true). This generates the query string i want.

提交回复
热议问题