How to separate value in NSMutableArray in iphone [closed]
My NsmutableArray having value like
myArray = "1,2,3,4,5....10";
these are comes from server. i want to separate it like
myarray = 1
2
3
.
.
.
10
how can i do this.
I guess this link will help you.
The response from the server would be NSString. Split that with the separator.
your response would be in NSString
// it will remove the double qoutes from your response
NSString *temp = [responseString stringByReplacingOccurrencesOfString:@"\"" withString:@""];
// gives a array of 1 2 3 ...
NSArray *aArray = [temp componentsSeparatedByString:@","];
hope it helps you...
精彩评论