This might be a very silly question. I am parsing 2 URLs in my project,after parsing 1st URL I get userID. Now in 2nd url I need to pass the userID. How I will put the userID in 2nd URL. What i am doing is:-
In viewdidload:-
NSString *str1=[[NSString alloc]initWithFormat:@"http://abc.com/user/%@/bookmarksdata",[arrayList valueForKey:@"userId"]];
NSLog(@"%@",str1);
In connectionDidFinishLoading :-
NSString *returnString=[[NSString alloc]initWithData:dataReceived encoding:NSASCIIStringEncoding];
SBJSON *jsonParser=[[SBJSON alloc]init];
NSDictionary *_dict=(NSDictionary *)[jsonParser objectWithString:returnString error:nil];
[arrayListG addObject:[_dict objectForKey:@”userId”]];
NSLog(@"===%@",arrayList);
I am getting userId from my 1st URL, now I want to pass it in given 2nd url. Please help me how to do this..
call this function from your connectionDidFinishLoading
after that remove the code from the viewdidLoad.and call the first value in the viewDidload function like this
add this function