Is there a standard way of passing an array through a query string?
To be clear, I have a query string with multiple values, one of which would be an array value.
I use React and Rails. I did:
js
let params = { filter_array: ['A', 'B', 'C'] } ... //transform params in URI Object.keys(params).map(key => { if (Array.isArray(params[key])) { return params[key].map((value) => `${key}[]=${value}`).join('&') } } //filter_array[]=A&filter_array[]=B&filter_array[]=C