How to add indexes to array in query string?
I tried send data like this:
axios.get(\'/myController/myAction\', { params: { storeIds: [1,2,3] }) <
axios.get(\'/myController/myAction\', { params: { storeIds: [1,2,3] })
In my case, I use ES6 array function. array element make querystring use reduce function. Object array also works.
const storeIds = [1,2,3] axios.get('some url', { params: { storeIds: storeIds.reduce((f, s) => `${f},${s}`) } })