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] })
Without having to add more libraries and using ES6 you could write:
axios.get(`/myController/myAction?${[1,2,3].map((n, index) => `storeIds[${index}]=${n}`).join('&')}`);