Last active
January 31, 2020 03:38
-
-
Save rudyhuynh/b7cbba3c61b3deaeade893273d380b28 to your computer and use it in GitHub Desktop.
Parse URL Query String to JSON
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[...new URLSearchParams(location.search)].reduce((acc, [key, value]) => ({...acc, [key]: value}), {}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment