How do I get a random word object from a parse database. Any ideas? Any random word from the API's dictionary
What do you mean, precisely ?parse database
do you get a return from a request ?
which request ?
what is the return
you want to get a random of what exactly ?
explain what you want to achieve
post some initial code
explain what problem you are facing
As an example: https ://guides.codepath. com/ios/Building-Data-driven-Apps-with-Parse
Then, if you have a query:
Code Block query.findObjectsInBackground { (posts: [Post]?, error: Error?) in if let posts = posts { // do something with the array of object returned by the call } else { print(error?.localizedDescription) } }
you can get a random item in array with:
Code Block if let randomPost = posts..randomElement() { // Do what you need of this random value }