There is a function that receives one argument from a query. If the query is only one item the input will be a string like for example "1". Otherwise if the query has two the argument will be an array like ["1", "2"].
I eventually need to work with an array to use it on a for each and work with the data. So i found this solution but i don't think is the best way to perform this.
//orderInput can be an string "1" or an array of strings ["1","2"]
const parseOrder = (orderInput) => {
const array = [].concat(orderInput);
array.forEach(odr => {
// Here it does something
});
return order;
}