I\'m missing something here. I\'ve got this jQuery JavaScript:
$.ajax({
type: \"POST\",
url: \"/update-note-order\",
dataType: \"json\",
data
Just set the traditional parameter to true
:
$.ajax({
type: "POST",
url: "/update-note-order",
dataType: "json",
traditional: true,
data: {
orderedIds: orderedIds,
unixTimeMs: new Date().getTime()
}
});
Since jquery 1.4 this parameter exists because the mechanism to serialize objects into query parameters has changed.
you'll need to turn orderedId's into a param array, or the controller won't see it
$.param({ orderedIds: orderedIds });
in your code:
$.ajax({
type: "POST",
url: "/update-note-order",
dataType: "json",
data: {
orderedIds: $.param({ orderedIds: orderedIds }),
unixTimeMs: new Date().getTime()
}
});