We are receiving an input parameter value as a pipe-delimited key-value pair, separated with =
symbols. For example:
\"|User=0101|Name=ImNewUse
Cleanest way possible, you can modify the source to split by a different delimiter.
https://gist.github.com/allensarkisyan/5873977#file-parsequerystring-js
`/**
* @name - parseQueryString
* @author - Allen Sarkisyan
* @license - Open Source MIT License
*
* @description - Parses a query string into an Object.
* - Optionally can also parse location.search by invoking without an argument
*/`
`
function parseQueryString(queryString) {
var obj = {};
function sliceUp(x) { x.replace('?', '').split('&').forEach(splitUp); }
function splitUp(x) { var str = x.split('='); obj[str[0]] = decodeURIComponent(str[1]); }
try { (!queryString ? sliceUp(location.search) : sliceUp(queryString)); } catch(e) {}
return obj;
}
`