hsearch/?available=1&status=55395790&country=Russia&menu_id=162&text=sometest&shop=phone&shop=table&shop=tv
function parseUrl(url) {
const parser = document.createElement("a");
parser.href = url;
let props = {};
parser.search.replace(/^\?/, '').split('&').forEach(item => {
const [prop, value] = item.split("=");
props[prop] = value;
});
return props;
}
function parseUrl(url) {
const parser = new URL(url);
let props = {};
parser.search.replace(/^\?/, '').split('&').forEach(item => {
const [prop, value] = item.split("=");
props[prop] = value;
});
return props;
}