json array string covvertion to nsmutable array
- by sudheer
I am getting Json response from server.
type = 2;
"daysofWeek" = "(\n Mon,\n Tue\n)";
serviceType = 2;
startDate = "2013-10-28";
In above format daysofWeek is Array string. I am trying to convert into NAMutableArray as
NSString *weekDaysStr=[valueDict objectForKey:@"recrWeek_daysofWeek"];
NSMutableArray *weekDays=[[NSMutableArray alloc] initWithArray:[weekDaysStr componentsSeparatedByString:@","]];
But when i log this array i shownig as
("\n Mon",
"\n Tue\n"
)
How to remove those extra words from array.
I have check each values to week day.
NSString *day=@"Mon";
if([day isEQualToString:[weekDays objectAtIndex:0]){
}
At that time its giving false condtion.Help me on this problem