I am trying to check for an empty value in a nested object, how would I loop through the nested properties?
for (var propt in updatedInputs) {
if (updatedInputs[propt] == "") this.cancelSubmit();
// check for nested properties
if (updatedInputs.hasOwnProperty(propt)) {
// loop through nested properties here
}
}
Sample object:
Object {contacts: Array[5]}
contacts: Array[5]
0: "04354355"
1: "24349878779"
2: "wqewqewqeqw"
3: "wqewqeqwe"
4: ""