2

When you make an AJAX request using jQuery, you can specify the data property that will be passed to the server. If the data contains an array of objects it passes it to the server in a format something like this:

MyArray[0][MyPropertyA]=123&MyArray[1][MyPropertyA]=456

Is there a way to get the query string it will generate for the AJAX request without actually doing the AJAX request?

1 Answer 1

3

jQuery param is your friend.

From the jQuery Param page:

Create a serialized representation of an array or object, suitable for use in a URL query string or Ajax request.

Sign up to request clarification or add additional context in comments.

1 Comment

Awesome. I was hoping there was something like this.

Your Answer

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.