Get random docs from PouchDB (or CouchDB)-open source projects pouchdb/pouchdb
I’m designing a quiz app with Angular and Ionic. I have about 2000 questions in json format and I choose PouchDB as database. CouchDB is perfect for me: I can add new question on a server and app auto update question and answer.
But I have a doubt now: I cannot find a way to get random docs from Pouch. With my app I will generate quizzes from some selected section and I must get a variable number of docs from my DB.
I’m using the db.allDocs([options], [callback])
api, I can set a limit but I cannot find a way to get random doc.
Is there any solution?