Have the web service return a Map.
@HttpPost
global static Map<String, String> getEmail(String app, String BorrowerId, String BorrowerName) {
System.debug('hit the web service');
System.debug(app);
System.debug(BorrowerId);
System.debug(BorrowerName);
Map<String, String> emailData = new Map<String, String>{'email' => 'woohoo'};
return emailData;
}
This allows you to treat the response as an NSDictionary
- (void)request:(SFRestRequest *)request didLoadResponse:(id)jsonResponse {
NSString *emailString = [jsonResponse objectForKey:@"email"];
NSLog(@"email: %@", emailString);
}
POST requests should be reserved for creating records, so you may consider re-doing this as a GET.