0

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.

asked Oct 28, 2009 at 19:48

1 Answer 1

12

You can use the param() function:

var str = jQuery.param({start: 1, end: 2, someString: "someStringValue"});
answered Oct 28, 2009 at 19:51
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.