I'm trying to make a query to get certain objects. The thing is.. I don't know how to make a query to get object that match an array. The User can be a member of multiple Groups, so the names of these groups are stored in User.groups as an array. I am trying to get all the objects of the class 'Group' that the current user is a member of. I came up with this:
ParseQuery query1 = ParseQuery.getQuery("_User"); //selects User Class
query1.whereEqualTo("username", current_user.toString()); //selects current user
query1.include("groups"); //include 'groups' of type array with names of the groups that the user is a member of
ParseQuery query2 = ParseQuery.getQuery("Group"); //select Groups Class
query2.whereContainedIn("group_name", ?); //<-- Get objects where group_name matches a value in the User.groups
The last line of code is obviously not the way to do it. I already looked at the Parse Guide! Help is much appreciated!