I would like to do a validation, make a for the first level and second level of a json, the second level should be printed only if there is this second level in the item of the current array. Ex json down:
content = {
"primeiroNivel0": {
"title":"Titulo Bonito",
"id":"001",
"url":"souUmaUrl",
"segundoNível": {
"title":"Titulo subnivel",
"id":"001.01",
"url":"souUmaUrlDeSubnivel",
}
},
"primeiroNivel1": {
"title":"Titulo Bonito1",
"id":"002",
"url":"souUmaUrl2"
}
}
The first levels would be printed on a for, and the second level would be only if they existed.
Any ideas?