I am pulling in a list of coordinates from our web server. I’m storing the whole list as an NSDictionary. While I am using the data (lat, long, radius, name) I would like to update the list of data with 1 or 2 more fields. Is there a way to insert these 2 items to the existing dictionary?
My only existing thought is that I would have to load the data into an NSMutableDictionary to allow additions and just create the new dictionary and overwrite the existing one with the new updated data. Hoping for a simpler or cleaner way rather than ghetto rigging it. Thanks in advance.
Your thought is correct, you have to create an NSMutableDictionary, as the NSDictionary can not be modified.
If you have any immutable arrays or dictionaries in the NSDictionary, you might need a deep copy for modifcations.