Hi I have this code.
NSString *infoString = [NSString stringWithFormat:@"http://link.com/post.php?name=%@&street=%@&city=%@&state=%@&zip=%@&lat=%@&lon=%@", name, street, city, state, zip, str1, str2];
NSURL *infoUrl = [NSURL URLWithString:infoString];
NSData *infoData = [NSData dataWithContentsOfURL:infoUrl];
NSError *error;
responseDict = [NSJSONSerialization JSONObjectWithData:infoData options:0 error:&error];
NSString *responseString = [responseDict copy];
NSLog(@"responseDict: %@", responseString);
In the console this shows up.
2012-06-14 22:37:04.022 PartyApp[20221:fb03] responseDict: {
status = 1;
}
Is there anyway I can make an if statement to show that if the value is 1 then do this and if it's not then do this. I have tried below.
if ([responseDict objectForKey:@"status = 1"]) {
Then do this
}
But it didn't work, what am I doing wrong or what could I do?