Skip to content Skip to sidebar Skip to footer

How To Access Returned Objects From Query So That Images Can Be Displayed?

Parse.com and JavaScript. The code below is returning the correct results, as per the screen shots, but.. How can I return and access each of the objects that has been captured by

Solution 1:

if the images are stored in an relation array "pic" which is an element in "FriendRequest" then you have to do an additional RELATION query to retrieve the array ....

this.collection = new UserList();
this.model = this.options.model;  // check whether user or role shoul b user        var relation = this.model.relation("users");
this.collection.query = relation.query();       
var role = this.model.id;
var rolename = this.model.get("name");
this.collection.fetch();

Above module works with Parse._Roles which has "users" field - an array of type relation

To work with the relation pointers in "user" , a 'relation' query is required. After the fetch, in the collection, you have the array of pointers like you want for your images.

Post a Comment for "How To Access Returned Objects From Query So That Images Can Be Displayed?"