In my application NSMutableArray comes like this,
Activity:(
"0-1",
"2-4",
"3-5",
"1-2"
)
I want data in NSMutableArray Like,
Activity:(
"1",
"4",
"5",
"2"
)
Please, Any one suggest me how can i do that?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
First of all I agree with Richard’s comment.
Also, it’s a bad habit naming your ivars capitalized.
That said, you can accomplish what you need with something like this:
And now you got an array with the substrings after the ‘-‘ so you could just replace your original array with the new one.