Create a Function for the .append in FormData depending on the length of the array.

    onSubmit = (e) => {
    e.preventDefault()
    var stringers = this.state.tags
    var tagarray = stringers.split(",");
    const formData = new FormData()
    formData.append('material[tags]', tagarray)

(this.state.tags is from an <Input>)
I have this on my onSubmit function. It won't run because it is a wrong code.
My question is: For Example, my this.state.tags contains "Apples,Oranges,Strawberries", It will be converted to an array tagarray with the value of 
["Apple", "Oranges", "Strawberries"]
0: "Apples"
1: "Orange"
2: "Strawberries"
length: 3

Now, I have said earlier that the above code is wrong. Why? 
Because, If I am passing 3 values from the array, my formData.append should be like 
formData.append('material[tags][0]', //one array value(Apples) here)
formData.append('material[tags][1]', //one array value(Oranges) here)
formData.append('material[tags][2]', //one array value(Strawberries) here)

But I can't make it fixed like that. I have to create a function that evaluates how many values are in the array and then that function must create the needed formData.append so I can pass it down to my axios later on. How do I create that? I am new in Javascript and ReactJS so Please help me. thanks!

use forEach() and template literals like so:
const formData = new FormData();
tagarray.forEach((value, index) => formData.append(`material[tags][${index}]`, value));