Given the code below:
requestRefresh("arg1", "arg2");
function requestRefresh ( listofnames ) {
var args = {
name: [],
action: "ajax.refresh"
};
for (var i = 0; i < arguments.length; ++i) {
args.name.push(arguments[i]);
}
jQuery.get(url, args).done(function ( results ) {
...
});
});
The query gets encoded as:
url?name%5B%5D=arg1&name%5B%5D=arg2&action=ajax.refresh
but I want it without the encoded '[]' after each "name":
url?name=arg1&name=arg2&action=ajax.refresh
Is there any way to accomplish this?