The api is returning an Nested Objects, what i want here is to go inside the nested array and fetch all the patato-child.
I also made all the actions, effects, reducers.
Json view:
{
"id":13,
"patato":Patato
"patato-child":[
{
"id":12,
"name":"Adventure"
},
{
"id":18,
"name":"Drama"
}
],
"url":"randomUrl.jpg",
"example":"Example"
}
Model view:
export interface Patato {
id: number;
patato: string;
url: string;
example: string;
patato-child: PatatoChild[];
}
export interface PatatoChild {
id: number;
name: string;
}
Component.ts
get patato-child() {
return this.patato.patatoChild;
}
HTML view:
[object Object, object Object]
What's wrong with this structure, i cant get any patato-child with ngFor for listing all the patato child
I am using Angular 2+ Redux+@ngrx