title: How do access values in a nested documents in MongoDB?
body: <p>I am trying to find the average sell of each console xbox, ps4, and wii. I am working with nested documents, and I try to access type to filter "sell" using db.console.find({"market.type":"sell"}); but I end up getting "online" type values as well.</p>
  
  <pre><code>Document 1:
  _id:("111111111111111111111111")
  market:Array
     0:Object
        type:"sell"
        console:"Xbox"
        amount:399
     1:Object
        type:"online"
        console:"PS4"
        amount:359
     2:Object
        type:"sell"
        console:"xbox"
        amount:349
  </code></pre>