You can use Promise.all
async function() {
const promises = paramArray.map(paramKey => axios.post(URL, {
filters: [
{
field: "key",
values: [paramKey.key]
}
]
})
);
const values = await Promise.all(promises)
const finalArray = paramArray.map((paramKey, index) => {
return {
key: paramKey.key,
text: values[index].data.itemName,
value: paramKey.value
}
})
}
CLICK HERE to find out more related problems solutions.