Tried to find how to make {foo:\"bar\"} from ?...&foo=bar&... but googled and got only to jQuery.params which does the opposit
{foo:\"bar\"}
?...&foo=bar&...
jQuery.params
The URLSearchParams() constructor creates and returns a new URLSearchParams object.
URLSearchParams()
var url = new URL('https://example.com?foo=1&bar=2'); var params = new URLSearchParams(url.search);
https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams/URLSearchParams