Database

db={"country":[{"_id":"5fbc7cc705253c2da4820425","name":"USA"},{"_id":"5fbc7cc705253c2da4820422","name":"PERU"},{"_id":"5fbc7cc705253c2da4820423","name":"COLOMBIA"}],"travel_reservation":[{"name_person":"pablo rojas","countrys_id":[{"country_id":"5fbc7cc705253c2da4820425"},{"country_id":"5fbc7cc705253c2da4820423"}]},{"name_person":"Anuel","countrys_id":[{"country_id":"5fbc7cc705253c2da4820422"}]},{"name_person":"Laura","countrys_id":[]}]}}

Query

db.travel_reservation.aggregate([{$unwind:"$countrys_id"},{$lookup:{from:"country",let:{ci:"$countrys_id._id"},pipeline:[{$match:{$expr:{$eq:["$country._id","$$ci"],},},},],as:"join",},},{$addFields:{join:{$arrayElemAt:["$join",0]},},},{$addFields:{"country_id.name":"$join.name"},},])/*** [* {* "name_person": "pablo rojas",* "countrys":[* {* "_id": "5fbc7cc705253c2da4820425",* "country": "USA"* },* {* "_id": "5fbc7cc705253c2da4820423",* "country": "COLOMBIA"* }* ]* },* {* "name_person": "Anuel",* "countrys":[* {* "_id": "5fbc7cc705253c2da4820422",* "country": "PERU"* },* ]* }* {* "name_person": "Laura",* "countrys":[* ]* }* ]**/

Result