I'm working with this function:
function Validate_Number(jsonFile){
jsonFile.forEach(f =>{
f.Notification.forEach(e =>{
e.Means.forEach(function(v){
let data = Object.keys(v);
data.forEach(function( x ){
if(properties2.indexOf( x ) > -1){
if(v.Number != undefined && v.Code != undefined && Number.isInteger(v.Number) === true && Number.isInteger(v.Code) === true){
for(var etiqueta in e.Contents){
if(etiqueta === "Message"){
}else{
throw new Error("Error code: E0008 \nValidation code: V0008 \nDescription: Code tag is not a number")
}
}
}
}
})
})
})
})
}
And when it enters the "else" it does not show the error message it just stops. Does anyone know why it could be?