how to send js array from ajax

Solutions on MaxInterview for how to send js array from ajax by the best coders in the world

showing results for - "how to send js array from ajax"
Gaia
09 Mar 2017
1$.ajax({
2            type: "POST",
3            url: "submit",
4            data: ({detailsArr : detailsArr }),
5            success: function(html){
6              alert( "Submitted");
7                }
8          });
9
Emely
07 Jan 2017
1$.ajax({
2            type: "POST",
3            url: "submit",
4            data:JSON.stringify(detailsArr),
5            success: function(html){
6              alert( "Submitted");
7                }
8          });
9