const example1 = {
  subex1: {
    ...something...
  },
  subex2: {
    ...something...
  }
};
This is the code. For some reason, I can't use example1[Math.floor(Math.random() * example1.length)] code. How can I get a random item from sub constants (actually idk their name if they're not subconst).