1. objectsvalueForKeyPath:(NSString *)str
NSMutableArray *mutableArray;
double sum = [mutableArray [objectsvalueForKeyPath:@"@sum.amount"] ];
返回数组mutableArray 中的各个元素的子属性amount的总和 返回赋值给sum
1. objectsvalueForKeyPath:(NSString *)str
NSMutableArray *mutableArray;
double sum = [mutableArray [objectsvalueForKeyPath:@"@sum.amount"] ];
返回数组mutableArray 中的各个元素的子属性amount的总和 返回赋值给sum