data is an array of type Object...
{
id: 1,
name: 'test'
},
{
id: 2,
name: 'test 2'
}
How can I access element.id when doing a forEach on data? In the below example it doesn't like element.id. It says Property 'id' does not exist on type Object.
// Need to make sure this code completes
data.forEach(element => {
this.myservice.delete(element.id).subscribe();
});
data?