I have a method that init my class object from JSON. The method like this:
func getList (dic : Array<[String:AnyObject]>) -> Array<Dog> {
let dogs : NSMutableArray = NSMutableArray()
for myDic in dic {
let dog = Dog.init(dog: myDic)
dogs.addObject(dog)
}
return NSArray(dogs) as! Array<Dog>
}
And I can present it on tableview without issue. But right now I want to make pagination for the list. If I run the method getList again it will be init new object and replacing my old one. How can I to add a new object to exisiting. I don't want to create separate object with the same property.