Note that there are some explanatory texts on larger screens.

plurals
  1. POData not showing from array
    primarykey
    data
    text
    <p>I have fetched data from json into array but when i access array contents it does not show it shows in count two records but do not show the contents</p> <pre><code>for (int i = 0; i&lt;[tempArray count]; i++) { id *item = [tempArray objectAtIndex:i]; NSDictionary *dict = (NSDictionary *) item; ObjectData *theObject =[[ObjectData alloc] init]; [theObject setUser_id:[dict objectForKey:@"user_id"]]; [theObject setSurvey_id:[dict objectForKey:@"survey_id"]]; [theObject setSurvey_title:[dict objectForKey:@"survey_Title"]]; [theObject setSurvey_Description:[dict objectForKey:@"survey_Description"]]; [theObject setDate_Created:[dict objectForKey:@"date_Created"]]; NSString*testing=[dict objectForKey:@"survey_id"]; NSLog(testing); [surveyList addObject:theObject]; [theObject release]; theObject=nil; int count =[surveyList count]; NSLog(@"Total is %d",count); } </code></pre> <p>I want to access like,</p> <pre><code>ObjectData*data=[surveyList objectAtIndex.path.row]; NSString*cellText=data.surveyDescription; </code></pre> <p>It does not show anything in cellText when NSLog, I don't know why it is like that because array has contents.</p> <pre><code> tempArray: ( { color = "[UIColor GrayColor]"; "date_created" = "2012-07-24 22:39:14"; "survey_description" = "Survey To get feedback from clients about food quality and any suggestion to improve the service"; "survey_id" = 1; "survey_title" = "Resturant Survey"; "user_id" = ali40; }, { color = "[UIColor greyColor]"; "date_created" = "2012-07-25 00:43:42"; "survey_description" = "Toursim Survey"; "survey_id" = 2; "survey_title" = "Travel Servey"; "user_id" = ali40; } ) </code></pre>
    singulars
    1. This table or related slice is empty.
    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.
 

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