I have an application in which I am having a json response like this.
{"success":"true","message":"You have logged in","pserial":"1"}
and I am separating with ":"
.
And I am getting data like this pSerial:"1"}
but I want only 1
value.
NSURL *url = [NSURL URLWithString:strUrl];
NSData *respData = [NSData dataWithContentsOfURL:url];
NSString *strResp = [[NSString alloc]initWithData:respData encoding:NSUTF8StringEncoding];
NSString *approvalString = [[strResp componentsSeparatedByString:@":"] objectAtIndex:3];
NSLog(@"pSerial:%@",approvalString);