What I ultimately want to have is:
import qs as 'qs'
qs.stringify({
country: 'us',
currency: 'USD',
'kw[]': 'apple',
'kw[]': 'banana',
'kw[]': 'pear',
})
But currently, I have:
const keywords = ['apple', 'banana', 'pear']
How can I convert that to the kw[] syntax?
reducepersonally. You can reduce the array to an object.