iphone - NSMutableArray of NSMutableDictionary with multiple keys, data structure -


i'm trying create data structure 3 fields. 1 method can grab 2 fields sqlite database. method grabs data using 2 fields sqlite database. way store data? 3 fields need of type:

nsstring, key: @"name" nsinteger, key: @"id" nsarray, key: @"info" 

i thought array of dictionaries. in first method, nsstring , nsinteger, create dictionary, , create array of dictionaries out of it. got stuck thinking how print out data nsmutabledictionary 2 keys (question #1).

then second thing thought was, can use name, id fields other piece of data table, , add new key/value pair dictionary. wasn't sure if done (question #2).

and didn't know if there better way approach different data structure (question #3).

thanks!

create class data items, ivar each name, id, info. have lot of flexibility.

while nsdictionary seems easy solution better create class rather easy , usability better.


Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -