0

I'm trying to get a user information from a table pointer but sound like it return empty object with just a user id

return new Parse.Query('grupoUser').include('user').equalTo("id_user", user).find().then(function ($zones)
{
    for (var i = 0; i < $zones.length; i++)
    {
        var zone = $zones[i];
        user = zone.get("id_user").getUsername();//return undefined
        user = zone.get("id_user"); // return a empty object with user id

    }
    return results || null;

}, function(response)
{
    return {};
});

1 Answer 1

1

From the code supplied, the property name is id_user not user, so your first line should look like this:

return new Parse.Query('grupoUser')
    .include('id_user')
    .equalTo('id_user', user)
    .find()
    .then(function ($zones)
{
  // etc...
Sign up to request clarification or add additional context in comments.

1 Comment

You save my day! i Thought you need to include the table, not the field! tks a bunch

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.