Reputation: 1027
I am using Facebook Parse with JavaScript with a Node/Express backend. I am looking to query my Parse database which contains over 900 objects of a particular class.
I am looking to arbitrarily split those 900 objects evenly 6 times. If it were an array, it would be something like objects[0:150]
, objects[151:300]
, etc...
How would I do this using Parse/JavaScript querying?
Thank you
Upvotes: 0
Views: 76
Reputation: 9911
If you're not looking to query all 900 at once (which you won't be able to do if you get more than 1000 anyway), you can use the paging facilities in the API to do this work for you.
limit and skip are the attributes of Parse.Query that you might be interested in.
This will result in more queries to the server though, so if speed is your concern (or you have more than 1000 objects), then it's best to do this in code rather than via the query.
Upvotes: 1