My backend throws a boolean value (true/false) which have to display as a string (active/inactive).
if (data['is_active'] == true) {
data['is_active'] = 'active';
this.is_active = data['is_active'];
} else {
data['is_active'] = 'inactive';
this.is_active = data['is_active'];
}
this is the above code written in mt typescript to check the condition, but it is not working
this.is_active="active"?