I have the following JSON format which is dynamic i.e., number of children can be different at anytime.
var Obj = {
"name": "A",
"count": 13,
"children": [{
"name": "B",
"count": 24,
"children": [{
"name": "C",
"count": 35,
"children": [],
"msg": null
},{
"name": "D",
"count": 35,
"children": [],
"msg": "Err"
}]
}]
}
How can we find if msg is not null in entire object Obj? I tried to use loop through objects but this format is not consistent as children array in the object is dynamic.I am new to underscore, Is there anyway to check with Underscore JavaScript?
namewhere message is null or something like that?