如何从parsingiOS中的相同的密钥获取数据?

我是新手进入Parse.com我尝试从相同的关键字的parsing表中获取数据,但价值是不同的像

-(void)getdata { NSMutableArray *allObjects = [NSMutableArray array]; NSUInteger limit = 1000; __block NSUInteger skip = 0; PFQuery *query = [PFQuery queryWithClassName:@"MapInfo"]; PFQuery *query = [PFQuery queryWithClassName:@"MapInfo"]; [query whereKey:@"Type" containedIn:@[@"Temopary", @"Business"]]; [query setLimit: limit]; [query setSkip: skip]; [query findObjectsInBackgroundWithBlock:^(NSArray *objects, NSError *error) { if (!error) { [allObjects addObjectsFromArray:objects]; if (objects.count == limit) { skip += limit; [query setSkip: skip]; [query findObjectsInBackgroundWithBlock:^(NSArray *objects, NSError *error) { [allObjects addObjectsFromArray:objects]; self.lqpinname=[allObjects valueForKey:@"GPIN"]; NSLog(@"Qpin name COunt %@",self.lqpinname); self.locationArray=[allObjects valueForKey:@"Location"]; self.llatitude=[self.locationArray valueForKey:@"lat"]; self.llongitude=[self.locationArray valueForKey:@"lng"]; self.laddress=[allObjects valueForKey:@"Address"]; self.lusernameArray=[allObjects valueForKey:@"AddedBy"]; hudView.hidden=TRUE; }]; } } else { NSLog(@"Error: %@ %@", error, [error userInfo]); } }]; } 

但它是返回Null值在这里我想从表中取数据哪里列Type=Business & Temporary请给我解决这个。

谢谢。

你应该能够使用whereKey:containedIn:来做到这一点。

 PFQuery *query = [PFQuery queryWithClassName:@"MapInfo"]; [query whereKey:@"Type" containedIn:@[@"Temopary", @"Business"]]; 

你也有一个临时的错字(除非是临时的东西) – 不知道这是否是有意的。