Advertisement
Guest User

Untitled

a guest
Jan 22nd, 2017
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. var listCursosNovos: [Cursos] = []
  2.  
  3. for i in 0..<JSON.count{
  4. var resultadoWS = JSON[i] as [String:AnyObject]!
  5.  
  6. curso.codcurso = resultadoWS?["COD_CURSO"] as? String
  7.  
  8. //Here I see that 'curso' comes as I wanted it
  9. print("Add curso: ",curso)
  10.  
  11. self.listCursosNovos.append(curso) //Here is the problem
  12. }
  13.  
  14. {codcurso = "Zezinho"}
  15. {codcurso = "Huginho"}
  16. {codcurso = "Luizinho"}
  17.  
  18. print("The final list is:",self.listCursosNovos)
  19.  
  20. {codcurso = "Luizinho"}
  21. {codcurso = "Luizinho"}
  22. {codcurso = "Luizinho"}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement