I'm getting the data in this format:
pert_submit: {systemId: "53183", pert-id: "176061", score: 0, q2c: "3\0", q2t: "", …}
Now I need to send it as FormData in my post request. Since I can't use an HTML form for this purpose, the data should be in the following format in the http post call
systemId: "53183", pert-id: "176061", score: 0, q2c: "3\0", q2t: ""
I attempted to use FormData like this
var form_data = new FormData();
for ( var key in this.dataObject['pert_submit'] ) {
form_data.append(key, this.dataObject['pert_submit'][key]);
}
How can I achieve sending FormData in the specified format as mentioned above
(systemId: "53183", pert-id: "176061", score: 0, q2c: "3\0", q2t: "")