Q:

Retrieving multiple users from Parse via REST API and using only one AFNetworking request

I need to retrieve multiple users from Parse.com, via their REST API, and using AFNetworking. I need to retrieve these users using one single API call.
The following code is able to fetch one user. You will notice that I am including one objectId because I am only fetching one user. I need to modify this code so that I can call for multiple objectId's and as a result, retrieve multiple users:
//Setup request manager
AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager];

[manager.requestSerializer setValue:ApplicationId forHTTPHeaderField:@"X-Parse-Application-Id"];
[manager.requestSerializer setValue:APIKey forHTTPHeaderField:@"X-Parse-REST-API-Key"];
[manager.requestSerializer setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];

NSDictionary *query = @{@"objectId":@"cbfG5dFJy7"};
NSError *error;
NSData *jsonData = [NSJSONSerialization dataWithJSONObject:query
                                                   options:0
                                                     error:&error];
if (!jsonData) {
    NSLog(@"Error: %@", [error localizedDescription]);
}
NSString *dateQueryString = [[NSString alloc] initWithData:jsonData
                                                  encoding:NSUTF8StringEncoding];
NSDictionary *parameters = @{@"where": dateQueryString};

//Perform request
[manager GET:[NSString stringWithFormat:@"%@users", BaseURLString] parameters:parameters
     success:^(AFHTTPRequestOperation *operation, id responseObject) {

         // Handle success
         completion(nil, self.mentors, nil);

     } failure:^(AFHTTPRequestOperation *operation, NSError *error) {
         // Handle failure
         completion(nil, nil, error);
     }];

In the Parse.com REST API documentation, it says that you can perform a compound or query to achieve this, and it lists the following in the GET request curl example:
--data-urlencode 'where={"$or":[{"wins":{"$gt":150}},{"wins":{"$lt":5}}]}' \

Unfortunately, I do not know how to translate that into objective-c. Here is the same example only in python if that helps:
params = urllib.urlencode({"where":json.dumps({
       "$or": [
         {
           "wins": {
             "$gt": 150
           }
         },
         {
           "wins": {
             "$lt": 5
           }
         }
       ]
     })})

I just need to include multiple objectId's in my AFNetworking call, and tell Parse.com that I'll accept results for this objectId, or that objectId, etc. so that Parse.com will return all of those users to me.

A:

You currently have a single dictionary for your query that you convert to JSON
NSDictionary *query = @{@"objectId":@"cbfG5dFJy7"};

The or example you show is a dictionary with a single key, where the value is an array of dictionaries like your current query.
@{@"$or":@[ @{@"objectId":@""} , @{@"objectId":@""} ]}

Once you have built this structure you convert it to JSON and add it to the request as you currently are.

