I have an array of javascript obejcts. I want to send this array to server. I tried :
JSON.stringify(jObectArray);
But at server side i am getting the empty array. How can i send it to server successfully ?
Without seeing any of your code:
var arr = ["one","two","three"];
arr = JSON.stringify(arr);
$.ajax({
url: "something.something",
data: {
theArray: arr
},
success: function(data) {
//success
}
});
EDIT:
What does your array look like...?
You should make:
$.ajax({
url :'urltoserver',
data: { myArray : jObectArray },
dataType: 'JSON'
});
jObjectArrayand (b) what the server is doing.typein ajax (getorpost)