title: How to retrieve username, email etc.. from user Pointer using parse cloud
body: <p>I am trying fetch user fields such as username, email..etc from user pointer <code>{"result":{"__type":"Pointer","className":"_User","objectId":"kArFHAxDNn"}}</code></p>
  
  <pre><code>  Ex:-  voted_userIds =  results_poll[i].get("voted_user_ids");
           voted_userIds[0].get("username");
           voted_userIds[0].get("email");
  </code></pre>
  
  <p>nothing is returning, it just return empty <code>{"result":""}</code></p>
  
  <p>I am facing this issue past 2 days. Could anybody help me ?</p>
  
  <p>Updated:- </p>
  
  <pre><code>// Use Parse.Cloud.define to define as many cloud functions as you want.
  // For example:
  Parse.Cloud.define("pollResults", function(request, response) {
    var query = new Parse.Query("Poll");
    var userData = new Parse.Query("User");
    Parse.Cloud.useMasterKey();
    userData.equalTo("objectId", request.params.userId);
  
    //FETCH A USER BY ID
    userData.get(request.params.userId, {
      success: function(object) {
  
          //POLL LIST
           query.include('voted_user_ids');
          query.equalTo("user", object);
            query.find({
              success: function(results_poll) {
              var voted_userIds='';
              var message = '';
                  for(var i =0; i &lt; results_poll.length; i++){
  
                          if ((typeof results_poll[i].get("voted_user_ids") !== "undefined") &amp;&amp; (results_poll[i].get("voted_user_ids") !== null)){
                              message = results_poll[i].get("voted_user_ids")[0].get("username");
                          }
  
                  }
                response.success("---&gt;"+message);
              },
              error: function() {
                response.error("no results found");
              }
            });
  
    },
      error: function() {
        response.error("no results found");
      }
    });
  
  
  
  });
  </code></pre>
  
  <p>Note:- voted_userIds contains array of user pointer.</p>