{
cityId: 1,
delivery: true
}
{
cityId: "1",
delivery: "true"
}
const search = window.location.search;
const result = search.slice(search.indexOf('?') + 1).split('&').reduce((params, hash) => {
let [key, val] = hash.split('=')
return Object.assign(params, {[key]: decodeURIComponent(val)})
}, {})
console.log(result)