javascript get query string value from url in json using javascript code example
Example: javascript urlsearchparams to object
var search = location.search.substring(1);
JSON.parse('{"' + decodeURI(search).replace(/"/g, '\\"').replace(/&/g, '","').replace(/=/g,'":"') + '"}')