To append an array to form data in JavaScript, we call the append
method.
For instance, we write
formData.append("tags", JSON.stringify(tags));
to call formData.append
with the key and value of the entry.
The value is an array converted to a JSON string with JSON.stringify
.