删除重复的数据
NSArray *array = @[@"qq", @"wechat", @"qq", @"msn", @"wechat"];
[array valueForKeyPath:@"@distinctUnionOfObjects.self"];
valueForKeyPath可以获取数组中相同key的元素
NSArray *arr = @[@{@"city":@"beijing",@"person":@{@"name":@"zhangsan"}},@{@"city":@"chengdu"}];
[arr valueForKeyPath:@"city"] 可以获取到city数组 @[@"beijing",@"chengdu"]