Note that there are some explanatory texts on larger screens.

plurals
  1. POhow to fetch Object from NSDictionary using ObjectForKey
    primarykey
    data
    text
    <p>I have 3 <code>NSMutableArray</code>s: <code>_parssedArrayOfName</code>, <code>_parssedArrayOfbirthdate</code>, <code>_CopyOFSelectedFaceBookFriends</code> </p> <p>In <code>_parssedArrayOfName</code> there are many names like below </p> <pre><code>2013-03-07 13:15:40.003 birthdate reminder 2[1102:15803] asdas{ ( "Nishith Shah", "Rupal Shah", "Viral Nagori", "Malay Shah", "Heather Joy", "Jatin Patel", "Bhushan H Trivedi", "Umang Patel", "Harshal Arolkar", "Nida Shaikh", "Yuriko Ramirez", "Aysu Can", "Bhargav Khatana", "Rahul Vador", "Viral Dave", </code></pre> <p>in <code>_parssedArrayOfbirthdate</code> there are birthdates like below</p> <pre><code>13-03-07 13:15:29.833 birthdate reminder 2[1102:15803] this is what im here( ( "&lt;null&gt;", "07/27", "06/11/1980", "08/22/1990", "&lt;null&gt;", "03/17/1985", "&lt;null&gt;", "10/17/1989", "&lt;null&gt;", "07/20", "12/08", "04/14/1992", "10/16", "&lt;null&gt;", </code></pre> <p>and <code>_CopyOFSelectedFaceBookFriends</code> is list of selected friends by user just for say Anand Kapadiya</p> <p>i am adding all names and birthrates in <code>NSDictionary</code> name as key and birthdate as value and then i want to fetch anand kapadiya birthdate from this Dictionary using <code>ObjectForKey</code>:</p> <p>but i am getting null value my code is as below plz help me</p> <p>Note: number of Birthdate And Names in different array are same and selected array value is always in names array</p> <p>Note2:can it be the reason for this issue? in Selector names is without "" while in name array all names are with ""</p> <p>Note3: as you can see my birthday array contain null values can it be the problem?</p> <pre><code>NSArray *objArr = [[NSArray alloc] initWithArray:_parssedArrayOfbirthdate]; NSArray *keyArr =[[NSArray alloc] initWithArray:_parssedArrayOfName]; NSArray *selector =[[NSArray alloc] initWithArray:_CopyOFSelectedFaceBookFriends]; NSDictionary *dic = [[[NSDictionary alloc] autorelease] initWithObjects:objArr forKeys:keyArr]; NSLog(@"asdas%@",dic.description); NSMutableArray *matches = [NSMutableArray array]; for (NSString *key in selector) { NSLog(@" see it%@",key); NSMutableArray *array1 = [dic objectForKey:key]; NSLog(@" matched%@",array1); [matches addObject:array1]; NSLog(@" matched%@",matches); </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload