objective c - sort an nsdictionary based on object(actually keys) of another array -


i have nsarray named self.ownerorderarray, logs this:

order array ( "date of birth", republic, marriage, currency, incentive, "interview dates", hobbies, "tanki online", skills, "sal range" ) 

i have nsmutabledictionary self.tempdict logs:

logs this:

tempdict dictionary is>>>>> { currency = 56789; "date of birth" = "2014-03-15"; incentive = 5; "interview dates" = "jan 20"; marriage = "2014-03-29"; "sal range" = "|#|0 - 10k|#|10k - 20k|#|20k -30k|#|30k-40k|#|40k-50k|#|"; "tanki online" = thunder; hobbies = cricket; republic = 26jan; skills = "|#|php|#|java|#|python|#|objctive-c|#|c|#|c++|#|objective-c++|#|c#|#|"; } 

how can above dictionary key/values sorted in same order self.ownerorderarray?

you can't dictionary logs values in same order because dictionary not have order.

what can array of values match order of array of keys using objectsforkeys:notfoundmarker:. if have of keys not found marker isn't issue, set [nsnull null]. if don't have keys need watch out nulls in resulting array.


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

android - Keyboard hides my half of edit-text and button below it even in scroll view -

css - Make div keyboard-scrollable in jQuery Mobile? -