If I've for example an object like:
{start: 1, end: 2, someString="someStringValue"}
Is there any simple way to serialize it into a string of data? Example:
start=1&end=2&someString=someStringValue
Thanks.
If I've for example an object like:
{start: 1, end: 2, someString="someStringValue"}
Is there any simple way to serialize it into a string of data? Example:
start=1&end=2&someString=someStringValue
Thanks.
Share Improve this question asked Oct 28, 2009 at 19:48 Alon GubkinAlon Gubkin 57.1k57 gold badges199 silver badges290 bronze badges1 Answer
Reset to default 12You can use the param()
function:
var str = jQuery.param({start: 1, end: 2, someString: "someStringValue"});