I have an array named as child_list like child_list: "9,8,21,22,20,24,25", take it in NSString at index 0 when I convert it into string its work but when i use NSMutableArray it crashed, I don't know why.
My code is here:
if([theDictionary objectForKey:@"child_list"])
{
NSString *str = [[theDictionary objectForKey:@"child_list"]objectAtIndex:0];
NSLog(@"Child List %@",str);
_child_list = [[NSMutableArray alloc ]initWithObjects: [str componentsSeparatedByString:@","], nil];
}
When break point come on str it show result when it comes on _child_list it crashed.