Good morning . I need help on checking if object exists and certain propertie have value of true. Ex:
validations={
"DSP_INDICADOR": {
"required": true
},
"EMPRESA": {
"required": true
},
.....
"NOME_AVAL": {
"required": false,
"notEqualToField": "NOME"
}
}
and then check for required:true
Thanks in advance
I guess this would be it.
if (validations["EMPRESA"] && validations["EMPRESA"].required) {
console.log(true)
} else {
console.log(false)
}