I am trying to retrieve 2 values from my Cloud Code function. A List of ParseUser and a List of ParseObject.
This is a snippet of the Cloud Code.
...
var finalResult = {"users":users,"groups":groups};
//users is an array of Parse.User
//groups is an array of Parse.Object
response.success(finalResult);
This is the call from the client.
ParseCloud.callFunctionInBackground("serviceUpdate", new HashMap<String, Object>(),new FunctionCallback<HashMap<String, List<ParseObject>>>() {
public void done(HashMap<String, List<ParseObject>> result, ParseException e) {
if (e == null) {
List<ParseObject> users = result.get("users");
List<ParseObject> groups = result.get("groups");
As you can see, users is now a ParseObject. How can I obtain the ParseUser? Any suggestion is appreciated.
0 comments:
Post a Comment