Skip to content

Instantly share code, notes, and snippets.

@nguyenit67
Created October 27, 2021 09:36
Show Gist options
  • Select an option

  • Save nguyenit67/771ec9cc4b0566a205ca7627c4b26e46 to your computer and use it in GitHub Desktop.

Select an option

Save nguyenit67/771ec9cc4b0566a205ca7627c4b26e46 to your computer and use it in GitHub Desktop.
Encode a Javascript Object into a string that I can pass via a GET Request
const searchString = new URLSearchParams(object).toString();
https://stackoverflow.com/a/53171438/13835451
Only work for flat object, not nested ones
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment