pass array in ajax javascript code example
Example 1: how to send js array from ajax
$.ajax({
type: "POST",
url: "submit",
data: ({detailsArr : detailsArr }),
success: function(html){
alert( "Submitted");
}
});
Example 2: how to send js array from ajax
$.ajax({
type: "POST",
url: "submit",
data:JSON.stringify(detailsArr),
success: function(html){
alert( "Submitted");
}
});