iphone - Sort Array By Sub-Array values in Objective C -


I have a multi-item array in Objective-C where every item has all-array with 4 items. I have to sort The main array based on one of the sub-array values ​​is needed

I think (soon)

how the array looks like this:

  (Marly, "Avenida Caracas - Calle 51", "4.637467, -74.0,66,799", one, "10,070.563466"), ("Calleigh 76", "Avenida Caracas - Calle 76 "," 4.6, 62, 9 18, -74.0,61,1 9 8 ", one," 7,250.832506 "), (Profamilia," Avenida Caracas - C Alle 34 "" 4.621341, -74.06, 9 76 ", one," 11,853.104432 "), (" Avenida 39 "," Avenida Caracas - Calle 39 "," 4.6,26,816, -74 .0,68,687 ", one," 11,243.55634 9 ")    

  [array sortUsingComparator: ^ NSComparisonResult (ID A, ID b) {NSString * name1 = [an objectAtIndex: 0]; NSString * name2 = [B ObjectOntIndex: 0]; Return [Name 1 Localized CissIncentive Comper: Name 2]; }]    

Comments