Hi,
I want to store this array in sql.in name column all name data will be store.in age and gender also like this.
this.state = {
rows: [],
Name: [],
Age: [],
Gender: [],
}
handleSubmit = async event => {
console.log("submitting: ", this.state.rows); let arr = this.state.Name;
let arr2 = this.state.Age;
let arr3 = this.state.Gender;
this.state.rows.forEach((i, v) => { arr.push(i.name); }); this.state.rows.forEach((i, v) => { arr2.push(i.age); }); this.state.rows.forEach((i, v) => { arr3.push(i.gender); }); event.preventDefault(); var body = { Name: arr ,
Age:arr2,
Gender:arr3 }; fetch(url, { method: 'post', headers: {'Content-Type':'application/json'}, body: JSON.stringify(body) }); };
this value coming from table data not from form. in c# i am using [FROMFORM] method.but this value passing null only.how can i store punch of table record to the sql from react table