I have found that encodeURIComponent works in most cases but when I pass an array, it doesn't work as expected. Here is my code:
var orderArray = [223746903996283,223525203804543]
var orders = encodeURIComponent(orderArray);
Logger.log(orders);
orders value is 223746903996283%2C223525203804543.
The expected value is %5B223746903996283%2C223525203804543%5D.
Thank you so much in advance.
