I have 40 arrays each has a value. What I want is to convert that into 1 array containing the 40 values. The array comes in a GET. My POST only accepts an Array with list of values. How do I achieve this in JavaScript?
handleSubmit(e){
e.preventDefault();
const post_url = "/send_report";
let data = JSON.stringify( {
recipient: this.state.email,
rooms: [this.state.roomIdNo]
});
roomIdNo:
Array[48]
0:
"room01"
1:
"room02"
2:
"room03"
3:
"room04"
4:
"room05"
5:
"room42"
6:
"room43"
........
...........
["room1", "room2", "room3", "room4"]```