I encountered an error and I'm not sure how to fix it. Can someone assist me?
The error message reads: "Type '{ animal:[{ id : 1,name: "Elephant"},{id : 2, name: "Horse"} []; }' is not assignable to type 'string[]'. Property 'includes' is missing in type '{ animal: { id: number; name: string; }[]; }'."
animals : string[];
...
let e = {
animal:[
{
id : 1,
name: "Elephant"
},
{
id : 2,
name: "Horse"
}
]};
this.animals = e;