[Vuejs]-FormData send the same three keys with three different values

0👍

The problem with your code is you have a loop that creates a NEW (FormData.set() creates new property everytime) property on every iteration and rewrites it right after.

Solution: All you need is append those values via formData.append('distributionChannels', value) in that loop. So on first iteration inexistent property will be created and on every iteration after the new value will be added to existed property.

Leave a comment