1
How do I access a list of objects within another list of objects?
I can capture these objects peacefully, but I’m having trouble capturing objects within this list.
This is my JSON:
In this case I want to have access to the values that are within "NOTES" and "MISSING" but I’m not having much success in this...
Follows my code:
for item in resultado!{
let newDisc = DisciplinasML()
newDisc.codDisciplina = item["COD_DISCIPLINA"]! as? String
newDisc.desDisciplina = item["DES_DISCIPLINA"]! as? String
newDisc.desPeriodo = item["DES_PERIODO"]! as? String
newDisc.medDisciplina = item["MEDIA_DISCIPLINA"]! as? String
newDisc.nomProfessor = item["NOM_PESSOA_PROF"]! as? String
newDisc.perFaltas = item["PERCENTUAL_AULAS"]! as? String
//Eu acho que não seja assim que se capture o valor
for nota in (item["NOTAS"]! as! NSArray){
//nota has no subscription members
print(nota["COD_AVALIACAO"] as String)
}
//Adiciono os itens na lista
self.listDisciplinasWS.append(newDisc)
}
Any hint?
I appreciate all your help