Appending NSDictionary to other NSDictionary

I have one NSDictionary and it loads up UITableView. If a user scrolls more and more, I call API and pull new data. This data is again in the form of an NSDictionary. Is it possible to add the new NSDictionary to the existing one?


You looking for this guy:

[NSMutableDictionary addEntriesFromDictionary:]

Make sure your UITableView dictionary is an NSMutableDictionary!

Check it here


Use NSMutableDictionary addEntriesFromDictionary to add the two dictionaries to a new mutable dictionary. You can then create an NSDictionary from the mutable one, but it's not usually necessary to have a dictionary non-mutable.