My API returns this JSON, it's the same employee which is present 2 times in my database. I can't delete it in my database, also how can I print only 1 of them when I make my get in angular? Or when I make my *ngfor:"let e of employee", how can I print only the first result?
getEmployee(id: string){
return this.http.get<any>(this.localUrlAPI+"/employee/getEmployee/"+id)
.pipe(map((res:any)=>{
return res.Data;
}))
}
{
"Data":[
{
"IdEmployee": "1",
"Name": "Jacob"
}
{
"IdEmployee": "1",
"Name" ; "Jacob"
}
]
}