From API, I am receiving this JSON:
[{
"id: "0",
"name_surname": "John Smith",
"age": 33,
"profile__image": "..."
},{
"id: "1",
"name_surname": "Juan García",
"age": 32,
"profile__image": "..."
}]
I have the next class in TypeScript:
export class Employee {
public Id: string = null;
public NameSurname: string = null;
public Age: number = 0;
public ProfileImage: string = null;
}
I want to return as Array<Employee> the result of API call.
As you see in the API call I receive the array with the properties separated by underscore (_). How can I convert to standard class without underscore?