I have an array of AnyObject type like this: [[String : AnyObject]]
animalList = [["name": ABC, "color":red], ["name": DEF, "color": green], ["name": GHI, "color": blue ]]
The model class is like this:
class ModelAnimal {
var name: String
var color: String
init(name: String, color: String){
self.name = name
self.color = color
}
}
How can I put them in an array of ModelAnimal type:
var myList = Array<ModelAnimal>()
for var i = 0; i < animalList.count; i++ {
myList.
}
ABCand the colors likeredStrings?