I am attempting to filter an array of objects named 'notes'. However, when I attempt this, I encounter the following error: Property 'contactId' does not exist on type 'any[]'.
notes: Array < any > [] = [];
currentNotes: Array < any > [] = [];
notes.forEach(element => {
//Filter out notes without contact
if (element.contactId != null) {
this.currentNotes.push(element);
}
})