I was wondering if its possible to pass data stored in a javascript array to the server using jQuery's ajax function..
In the jQuery documentation it specifies:
$.ajax({
type: 'POST',
url: url,
data: data,
success: success,
dataType: dataType
});
can "data" be set to an array? How would this work given it seems data is expecting key value pairs? I currently just hard code the values but I want it to be a more dynamic approach..my current code is:
jQuery.ajax({
url: "/createtrips/updateitin",
type: 'POST',
data: {place1: 'Sydney', place2: 'London'},
dataType: 'json',
});