Within my form
, I have three input fields labeled Name
, hours
, and minutes
. When I execute a POST operation, I combine the values of hours
and minutes
into a variable named duration
before sending it to the api.
The resulting JSON structure appears as follows:
[
{
"displayName": "Car Rent",
"duartion": "06:27:00",
},
{
"displayName": "Bike Rent",
"duartion": "10:15:00",
},
{
"displayName": "Texi Rent",
"duartion": "05:30:00",
},
]
However, when I concatenate the values of hours
and minutes
and perform a POST request, the JSON string is altered as shown below:
[
{
"id": "7249328f-fad4-4548-87b0-947e99b57892",
"displayName": "Car Rent",
"duration": "1020.00:00:00", <===============
},
{
"id": "7e39f9302-77b3-4c52-a858-adb67651ce86",
"displayName": "Taxi Rent",
"duration": "0510.00:00:00", <===============
}
]