ios - NSArray of dictionaries -


i have nsarray of nsdictionaries coming server json format. want add 1 more nsdictinoary nsarray of nsdictionaries. nsdictionary based on key value pair. response getting. want add dictionary of same format "table". pls help..

thanks in advance..!!

table =     (                 {             name = “xyz”;             recordid = 3;             prefrenceorder = 1;         },                 {             name = “abc”;             recordid = 2;             prefrenceorder = 2;         },                 {             name = “swe”;             recordid = 450;             prefrenceorder = 3;         },                 {             name = “asd”;             recordid = 451;             prefrenceorder = 4;         }     ); 

as nsarray coming server immutable need create new instance of nsmutablearray add own dictionary response coming server.

nsmutablearray *newtable = [nsmutablearray arraywitharray:table]; [newtable addobject:your_new_dictionary]; 

Comments