sorting objects in NSMutableArray
<p>My NSMutableArray contain the list of GroupUser objects :</p>

<pre><code>@interface GroupUser : NSObject {

    NSString *groupUser_name;//user name
    NSString *groupUser_customMsg;
    NSString *groupUser_emailId;
    NSString *groupUser_groupName;
    NSString *groupUser_aliasName;
    int groupUser_imageId;
    int groupUser_state;//whether user is online( value 0) offline(value 1) or busy(value 2)
    int groupUser_type;             
}
</code></pre>

<p>now i want to sort the list :
1. On the bases of  groupUser_state 
2. On the bases of groupUser_name</p>

<p>eg::  1.   Sam             Offline(value 1)
      2.   Ravi            Online(value 0)
      3.   Amit            Online(value 0)
      4.   Ganga           Online(value 0)
      5.   Durga           Offline(value 1)</p>

<p>Output after sorting should be::
1.  Amit   Online
2.  Ganga  Online
3.  Ravi   Online
4.  Durga  Offline
5.  Sam    Offline</p>

<p>Help me by providing code for the same.. Thanx in advance</p>
