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
Post a Comment