Hi I'm new to iOS development. I want to get response and add those values to variable.
I tried it but I'm getting below response. I don't understand why there is slashes in this response.
@"[{\"VisitorID\":\"2864983a-e26b-441a-aedf-84e2a1770b8e\",\"ProfileID\":\"69c02265-abca-4716-8a2f-ac5d642f876a\",\"CompanyID\":null,\"VisitorName\":\"kanasalingam\",\"OperatorName\":\"baman\",\"Image\":null,\"isocode\":\"lk\",\"CurrentOperator\":[\"69c02265-abca-4716-8a2f-ac5d642f876a\"]},{\"VisitorID\":\"133bc108-b3bf-468a-9397-e1b0dba449db\",\"ProfileID\":\"69c02265-abca-4716-8a2f-ac5d642f876a\",\"CompanyID\":null,\"VisitorName\":\"kumar\",\"OperatorName\":\"baman\",\"Image\":null,\"isocode\":\"lk\",\"CurrentOperator\":[\"69c02265-abca-4716-8a2f-ac5d642f876a\"]}]"
I tried this :
- (void) sendOtherActiveChats:(NSDictionary *) chatDetails{
NSLog(@"inside sendOtherActiveChats");
NSLog(@"otherDetails Dictionary : %@ ", chatDetails);
NSString *VisitorID = [chatDetails objectForKey:@"VisitorID"];
NSString *ProfileID = [chatDetails objectForKey:@"ProfileID"];
NSString *CompanyID = [chatDetails objectForKey:@"CompanyID"];
NSString *VisitorName = [chatDetails objectForKey:@"VisitorName"];
NSString *OperatorName = [chatDetails objectForKey:@"OperatorName"];
NSString *isocode = [chatDetails objectForKey:@"isocode"];
NSLog(@"------------------------Other Active Chats -----------------------------------");
NSLog(@"VisitorID : %@" , VisitorID);
NSLog(@"ProfileID : %@" , ProfileID);
NSLog(@"CompanyID : %@" , CompanyID);
NSLog(@"VisitorName : %@" , VisitorName);
NSLog(@"OperatorName : %@" , OperatorName);
NSLog(@"countryCode: %@" , isocode);
NSLog(@"------------------------------------------------------------------------------");
}
Can some one help me to get the values out of this string ?