I would like to validate if my object in its properties are empty or null.
const references = {
reference1 : {
"name" : "",
"phone" : ""
},
reference1 : {
"name" : null,
"phone" : null
}
}
I have tried to do the following but it is not what I am really looking for
console.log(Object.keys(references.reference1).lenght == 0)
Via Active questions tagged javascript - Stack Overflow https://ift.tt/WPs97uT
Comments
Post a Comment