[Array sortUsingComparator:^NSComparisonResult(id obj1, id obj2) {
NSMutableDictionary* tempDict = obj1;
NSMutableDictionary* tempDict2 = obj2;
NSTimeInterval Num1 = [[tempDict objectForKey:@"date"] timeIntervalSince1970];
NSTimeInterval Num2 = [[tempDict2 objectForKey:@"date"] timeIntervalSince1970];
if (Num1 > Num2) {
return (NSComparisonResult)NSOrderedDescending;
}
if (Num1 < Num2) {
return (NSComparisonResult)NSOrderedAscending;
}
return (NSComparisonResult)NSOrderedSame;
}];