How to find random record in Mongoose
<p>How can I find random records in MongoDB?</p>

<p>I found multiple articles here on StackOverflow, but I couldn't understand them.
Like for example:</p>

<pre><code>db.yourCollection.find().limit(-1).skip(yourRandomNumber).next()
</code></pre>

<p>How would I execute it in my code? (collection is <code>User</code>)</p>

<pre><code>User.findOne(RANDOM PLAYER).then(result) {
    console.log(result);
}
</code></pre>