title: Object.keys, how to get a list of keys in mongodb
body: <pre><code>{
  "_id": "1",
  "style": "13123",
  "category": "dress",
  "colors": {
      "Black": {
          "prestock": 50,
          "instock": 60,
          "inactive": 0
          },
      "Blue": {
          "prestock": 30,
          "instock": 0,
          "inactive": 0
          },
      "Red": {
          "prestock": 10,
          "instock": 60,
          "inactive": 0
          }
    }
  }
  </code></pre>
  
  <p>i have above json, i need to access to prestock, instock, and inactive.
  but colors' value will change depending on styles. 
  for example: </p>
  
  <pre><code>{
   "_id": "2",
   "style": "14321", 
   "category": "top",
   "colors": {
       "Green": {
          "prestock": 50,
          "instock": 60,
          "inactive": 0
           }, 
       "Yellow": {
          "prestock": 50,
          "instock": 60,
          "inactive": 0
           }
        }
  }
  </code></pre>
  
  <p>how can i query this in mongodb? 
  would this something that's related to Object.keys(obj)?</p>
  
  <p>ps.if this is a duplicate question please guide me!</p>
  
  <p>Thanks!</p>