I have this array['ca','ba','es']
How can i covnert to object so that i have r=ca, r=ba, r=es.
So in queryParams when i add i will have url something like this:
r=ca&r=ba&r=es
I tried something like this but its not working:
let obj = this.queries.r.reduce(function(acc, cur, i) {
'r' = cur;
return acc;
}, {});
Because r is not valid as param.Any suggestion how can i fix this?
r=${s}).join("&")['ca','ba','es'].map(s => `r=${s}`).join("&")