Advertisement
Guest User

Untitled

a guest
Apr 18th, 2014
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. NSString *strURL2 = [NSString stringWithFormat:@"MyURL"];
  2. NSData *dataURL2 = [NSData dataWithContentsOfURL:[NSURL URLWithString:strURL2]];
  3.  
  4. NSString *strResult2 = [[NSString alloc] initWithData:dataURL2 encoding:NSUTF8StringEncoding];
  5. NSDictionary *json2 = [strResult2 JSONValue];
  6.  
  7. userExists = [json2 valueForKeyPath:@"userId"];
  8.  
  9. NSString *strURL2 = [NSString stringWithFormat:@"MyURL"];
  10. NSData *dataURL2 = [NSData dataWithContentsOfURL:[NSURL URLWithString:strURL2]];
  11.  
  12. NSString *strResult2 = [[NSString alloc] initWithData:dataURL2 encoding:NSUTF8StringEncoding];
  13. NSDictionary *json2 = [strResult2 JSONValue];
  14.  
  15. [userExists addObject:[[json2 objectForKey:@"userId"] integerValue]]
  16.  
  17. if([userExists objectAtIndex:i] == [[json2 objectForKey:@"userId"] integerValue]) {
  18. ....
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement