Scenario: You need to store a nested JavaScript object in the URL's querystring
Scenario: You need to store a nested JavaScript object in the URL's querystring.
Solution:
1. Convert the object to a string via JSON.stringify
2. Encode the string for the URL via encodeUriComponent.
Is this the most elegant solution?

Many useful responses in this thread. Thank you all!
The qs project on npm looks most useful and readable to me: https://www.npmjs.com/package/qs
Also, someone pointed out UrlSearchParams encodes automatically, so I'm including a fixed example below.
