I have 500 records on parse class or table and now i need to get 10 random records out of 500 records?
Please tell me how can I do this.
ParseQuery
Here is an Objective C code sample.
PFQuery *query = [PFQuery queryWithClassName:@"MyTable"]; int count = [query countObjects]; int r = arc4random_uniform(count); PFQuery *query2 = [PFQuery queryWithClassName:@"MyTable"]; query2.skip = r; PFObject *result = [query2 getFirstObject];
`