Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6334337
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T18:38:26+00:00 2026-05-24T18:38:26+00:00

i m parsing a json file.the logic goes like this, if there is no

  • 0

i m parsing a json file.the logic goes like this, if there is no data in the variable named boy.it got to enter the if loop and if there is data it got to enter the else part.but the problem is even if the variable boy is empty(which shows empty in the console) the loop still enters the else part..cud u guys help me out..below is the code..

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
// Navigation logic may go here. Create and push another view controller.
NSDictionary *boy=[url objectAtIndex:indexPath.row];
NSLog(@"the boy value:%@",boy);
if (boy == NULL) 
{
Secondetailview *detailViewController1 = [[Secondetailview alloc] initWithItem:boy];    
[self.navigationController pushViewController:detailViewController1 animated:YES];
[detailViewController1 release];    
}else
{
    FirstViewDetail *detailViewController = [[FirstViewDetail alloc] initWithItem:boy];

    [self.navigationController pushViewController:detailViewController animated:YES];
    [detailViewController release];
}

}
enter image description here

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T18:38:27+00:00Added an answer on May 24, 2026 at 6:38 pm

    I would try to use if (boy == nil) but that doesn’t seem to work either.

    Instead do this:

    NSString *str = [NSString stringWithFormat:@"%@", boy];
    if ([str isEqualToString:@""]) {
        //boy is nil do your stuff
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am parsing this JSON file (correctly, it works with the UITextFields): {longitude:[37.786793,39.388528],latitude:[-122.395416,-78.887734]} ind
I am parsing data from a json file and converting to a HTML table,
I got an error in parsing JSON on Android. This is my JSON method:
I have this JSON file (the parsing OK, the problem is displaying the contents
i try to parsing json with format like this { bossresponse:{ responsecode:200, web:{ start:0,
I've having issues with parsing JSON data from a php file through to JQuery.I've
I need help in parsing big Json file: {status:{code:200,text:OK},content:[{proposalId:12536,providerId:1,supervisorName:null,supervisorEmail:lolbroek_13@hotmail.com,hostInstitution:qsd,hostCountry:qsd,hostCity:QSD,hostTypeId:1,title:qsd,status:available,numberStudents:null,description:qsd,categoryId:34,startDate:null,endDate:null,submitDate:null,expectedWorkload:null,purpose:null,workOrganisationId:1,function:null,audienceId:1,preConditions:,certificationGranted:null,deliverables:null,expenses:null,revenue:null,vacancies:null,uploadImg:http:\/\/193.136.60.238\/\/MUTW2012\/core\/img\/internship.png}, {proposalId:12537,providerId:1,supervisorName:null,supervisorEmail:lolbroek_13@hotmail.com,hostInstitution:qsd,hostCountry:qsd,hostCity:QSD,hostTypeId:1,title:qsd,status:available,numberStudents:null,description:qsd,categoryId:34,startDate:null,endDate:null,submitDate:null,expectedWorkload:null,purpose:null,workOrganisationId:1,function:null,audienceId:1,preConditions:,certificationGranted:null,deliverables:null,expenses:null,revenue:null,vacancies:null,uploadImg:http:\/\/193.136.60.238\/\/MUTW2012\/core\/img\/internship.png}, {proposalId:12538,providerId:1,supervisorName:null,supervisorEmail:lolbroek_13@hotmail.com,hostInstitution:qsd,hostCountry:qsd,hostCity:QSD,hostTypeId:1,title:qsd,status:available,numberStudents:null,description:qsd,categoryId:34,startDate:null,endDate:null,submitDate:null,expectedWorkload:null,purpose:null,workOrganisationId:1,function:null,audienceId:1,preConditions:,certificationGranted:null,deliverables:null,expenses:null,revenue:null,vacancies:null,uploadImg:http:\/\/193.136.60.238\/\/MUTW2012\/core\/img\/internship.png}, {proposalId:12539,providerId:1,supervisorName:null,supervisorEmail:lolbroek_13@hotmail.com,hostInstitution:qsd,hostCountry:qsd,hostCity:QSD,hostTypeId:1,title:qsd,status:available,numberStudents:null,description:qsd,categoryId:34,startDate:null,endDate:null,submitDate:null,expectedWorkload:null,purpose:null,workOrganisationId:1,function:null,audienceId:1,preConditions:,certificationGranted:null,deliverables:null,expenses:null,revenue:null,vacancies:null,uploadImg:http:\/\/193.136.60.238\/\/MUTW2012\/core\/img\/internship.png}, ................[etc] I
I'm having a problem parsing a JSON file in AS3. Im trying to parse
I'm attempting to retrieve a JSON file from an API for parsing. I'm using
I'm parsing JSON that is contained in an HTML element. Consider this markup: <div

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.