myArray = ['1', '2', '3']; var arrStr = encodeURIComponent(JSON.stringify(myArray)); window.location = url + '/?id='+id + '&type=' + myArray;