title: How to pick a Javascript object randomly by index?
body: <p>I have the following var, which is an object:</p>
  
  <pre><code>var users = {};
  </code></pre>
  
  <p>I insert users in this object like this:</p>
  
  <pre><code>users["john"] = "johns property";
  users["mike"] = "mikes property";
  users["luke"] = "lukes property";
  </code></pre>
  
  <p>I've read many questions here, and I've learned that you can't access objects directly by index. Ok, no problem, because I need to pick any random object from this "array of objects" (if that's the right expression).</p>
  
  <p>More specifically, I want to <strong>pick any random object from the collection</strong>, it can be john, mike or luke, whichever. I know I can use a random number generator to get a random index, but then I won't be able to access an object from the collection using the index; so I'm looking for directions.</p>