objective c - How to get the name of the Key of a NSMutableDictionary -


i trying name of key of nsmutabledictionary in loop. getting frustrated because can't find right function key without having reference object @ all.

i appreciate guidance. key want string

nsmutabledictionary* mymutadictionary = @{ @"thevaleiwantone":@{key:value},                              @"thevaleiwanttwo":@{key:value}                            };  (nsdictionary* mydictionary in mymutadictionary) {     nsstring* key1 = //... code thevaleiwantone , thevaleiwanttow; } 

i come php operation simple as

foreach ($variable $key => $value) {      $thisismykeyname = $key;     $thisisthevalueofthatkey = $value; } 

sounds looking keyenumerator

for (nsstring *key in [dict keyenumerator]) {     nsstring *value = [dict objectforkey:key]; } 

Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -