I have the below json example from my API:
{"Name":"John","Address":"New Town"...} - so the properties like Name and address starts with an upper-case.
I tried to set the return value into the below dto and it does not work. However if I change the name to Name and address to Address, it works. As per my coding convention, I have to use camel case. Is there a way to ignore the case in the mapping?
export interface Employees{
name: string;
address: string;
}
Here is how I do the mapping:
employeeResults: Employees[] = [];
this.employeeService.getEmployeeResults().subscribe((employee: Employees[]) => {
this.employeeResults= hotels;
})