I have a problem with mapping fetched JSON from the API to an existing object. TypeScript code:
Hero Interface:
export interface Hero {
id: number;
name: string;
}
Console log:
this.hero is always empty (undefined). How to solve this
PS. I'm new in Angular and typescript.

