I have a function in Angular that brings an array with user data, among which one field is user.type_identity_id, and I have another function where I bring the types of identities, how can I compare and according to the user.type_identity_id print the field type_identity.name in HTML
user = [{id: 25, tipo_identidad_id: 1, identidad: 2121212}]
tipo_identidad= [
{
"id": 1,
"name": "DNI"
},
{
"id": 2,
"name": "Pasaporte"
},
{
"id": 3,
"name": "RUC"
}]
<h3>Tipo de Identidad:</h3><b>{{tipo_identidad.name}}</b>