I’ve objects of array, in each object i have different type of strings in one string i am getting date from xml parsing, now my task is that to sort whole data according to time wise(like before date then current date then after date). I am having two problems.
- How to sort array on this structure like objects of arrays if simple
then it’ll more easy for me? - Which function should I use to sort date wise?
One of several options would be using a comparator block. You didn’t provide enough informations, so I made some assumptions:
Code
But you should also consider to have an class representing the data.
In that case you would inter ate over the raw dater and create a object for every data set, put it in an NSMutableArray and sort this. similar.