If have an NSMutableArray foo of an NSMutableArray bar of objects. Each of the objects have a property that is a numerical value. In each NSMutableArray bar I want to sum this numerical property of each object. Then I want to sort the NSMutableArray foo by this sum. What's a good way to do this?