Created
April 2, 2019 03:41
-
-
Save lilywang711/f89d67c6a6b1ca2e8d4a23d5d8fba356 to your computer and use it in GitHub Desktop.
url2object
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
var search = location.search.substring(1); | |
JSON.parse('{"' + decodeURI(search).replace(/"/g, '\\"').replace(/&/g, '","').replace(/=/g,'":"') + '"}') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment