http://127.0.0.1:8890/demo1/?search=hello%2Cbuddy&Agg=Target+-+All
How do I split the above url and fetch 'search=hello%2Cbuddy' and replace the url as http://127.0.0.1:8890/demo1/?search=goodbye&Agg=Target+-+All
Using javascript I've only reached this far;
var get_url = window.location.href
var parts = get_url.split('/') # doesn't make sense