I am working on angular post and try to send a post request with two json object with two diff form bodies in one post request.I have two form but i need to submit the data in one post request.
I and need the post request data in this way.
{
"detail": {
"status": "class",
"service_type": "online",
},
"subject": {
"start_date": "2022-06-28",
"end_date": "2022-06-29",
"start_time": "10:00",
"end_time": "12:30",
}
}
But After getting the data i am trying to create json object like this. Is this right way to do so?
const body = [{"detail":{"status":"BrakePad","service_type":"online"},"subject":{"start_date": "2022-06-28",} }];