I am encountering an issue while sending a camelCase formatted object in the response body using Nestjs for my backend service.
{
id: 4,
customerId: 4,
birthdate: null,
availablePoints: 'test_snake_case',
redeemedPoints: 'testCamelCase',
createdAt: new Date('2023-05-31T11:43:31.069Z'),
updatedAt: '2023-05-31T11:43:31.069Z'
}
{
"id": 4,
"customer_id": 4,
"birthdate": null,
"available_points": "test_snake_case",
"redeemed_points": "testCamelCase",
"created_at": {},
"updated_at": "2023-05-31T11:43:31.069Z"
}
In the transformed object, the property createdAt is replaced with an empty object {} instead of maintaining its original value.