Basically I\'m trying to pass a URL like this:
www.foobar.com/?first=1&second=12&third=5
into a URL like this:
http
In jQuery, you can use:
let myObject = {first:1, second:12, third:5}; jQuery.param(myObject);
Doc: http://api.jquery.com/jquery.param/ The output: first=1&second=12&third=5 This will format it, whatever your object contain.