My first experience with Parse has been great so far. I've successfully worked on reading and writing data.
Now I am faced with a seemingly simple task, but in the Parse context, it feels like a challenge to implement and my usual search skills are not helping me much.
I am trying to retrieve items using code snippet below:
var query = new Parse.Query(CommentClass);
query.limit(2);
query.descending('createdAt');
query.find({
success: function(object) {
callback({
comments: object
});
},
error: function(object, error) {
console.log('there was an error');
}
});
The problem is, I need information about the indexes of the returned items compared to the total list. For example, if there are 5 items in total, this code will return the last 2 created items. However, there is no direct way to know the position of these items in the complete list without making another request.