I am having List Array like: this is getCall.
[ {"presenter":"Bharath","topic":"Angular","status":"scheduled","emailId":"bharathkumar@gmail.com"}, {"presenter":"Sayyad","topic":"Angular","status":"organized","emailId":"raheemsayyad@gmail.com"},{"presenter":"Kanchan","topic":"APS","status":"scheduled","emailId":"kanchanubey@gmail.com"} ];
if Logged user is kanchanubey@gmail.com is matches to this List of Array emailId. i need to enable checkbox . if not matches need to do disable.
Code :
private getktsession(){ console.log('==', this.sesionUser['emailid']);
this.service.getKtsession().subscribe(data =>{
console.log('get', data);
this.ktsessions = data;
data.filter(user => {
if(user.emailId === this.sesionUser['emailid']){
this.isDisabled =false;
} else {
this.isDisabled =true;
console.log('else');
}
});
});
} HTML code is