title: IOS Parse how do I retrieving objects from a query based on two classes?
body: <p>I have two classes <code>User</code> and <code>Post</code>. The <code>User</code> class has a <code>userType</code> field and I want to retrieve all of the posts from a given <code>userType</code> lets call them group x. In the <code>Post</code> class I have a pointer to the <code>User</code> class.</p>
  
  <p>I was trying to do something like, first retrieve all user Ids for the type of user I want:</p>
  
  <pre><code>PFQuery *queryUser = [PFQuery queryWithClassName:kFTUserClassKey];
  [queryUser whereKey:kFTUserTypeKey equalTo:kFTUserTypeX];
  [queryUser whereKey:kFTUserLocationKey nearGeoPoint:nearGeoPoint withinMiles:miles];
  [queryUser findObjectsInBackgroundWithBlock:^(NSArray *usersTypeX, NSError *error) {
              if (!error) {
                  NSMutableArray *objectIds = [[NSMutableArray alloc] init];
  
                  // Add ambassador ids into query
                  for (PFObject *userX in usersTypeX) {
                      [objectIds addObject:[PFObject objectWithoutDataWithClassName:kFTUserClassName objectId: userX.objectId]];
                  }
              }
  }];
  </code></pre>
  
  <p>And then I wanted to query based on these objectIds but I am not sure how to query on this array or if this is even the correct way to do this. How can this be done?</p>