How can I parameterize an array so that it's a single name value pair that's comma separated. Using jQuery $.param creates a parameter for each array value instead of just one. And apparently there's no option or setting to change this. I'm looking for more than just using Array.join since I need deep serialization and also url encoding. Is there an jQuery.param option or utility library for this?
Using jQuery's param method:
$.param({ a: [2, 3, 4] }); // "a[]=2&a[]=3&a[]=4"
I need:
var p = {a: [2, 3, 4]};
param(p) //"a=2,3,4"