title: How do I select a random object(?) from a JSON file with Javascript?
body: <p>In my Discord Bot that I am making, it needs to select a random object from a JSON file. My current code is this:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>    function spawn(){
          if (randomNum === 24) return
          const name = names.randomNum
          const embed = new Discord.RichEmbed()
          .setTitle(`${name} has been found!`)
          .setColor(0x00AE86)
          .setThumbnail(`attachment://./sprites/${randomNum}.png`)
          .setTimestamp()
          .addField("Quick! Capture it with `&gt;capture`!")
          msg.channel.send({embed});
      }</code></pre>
  </div>
  </div>
  </p>
  
  <p>The JSON file looks like this:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>{
      "311": "Blargon",
      "310": "Xryzoz",
      "303": "Noot",
      "279": "",
      "312": "Arragn",
      "35": "Qeud",
      ...
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p>I want it to pick a random one of those, such as <code>303</code>, and post it in a rich embed. What do I do from here?</p>