views:

122

answers:

1

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.

+7  A: 

You can use the param() function:

var str = jQuery.param({start: 1, end: 2, someString: "someStringValue"});
Greg