Organizational Research By

Surprising Reserch Topic

how to Serializing to JSON in jQuery ?


My specific situation: I have an array defined something like this:

var countries = new Array();
countries[0] = 'ga';
countries[1] = 'cd';
...

and I need to turn this into a string to pass to $.ajax() like this:

$.ajax({
    type: "POST",
    url: "Concessions.aspx/GetConcessions",
    data: "{'countries':['ga','cd']}",
...

 

asked Jun 3, 2015 in JAVASCRIPT by rajesh
0 votes
92 views



Related Hot Questions



Government Jobs Opening


...