title: MongoDB Finding nested object value
body: <p>I'm trying to find documents within my collection that have a numeric value greater than x amount. The documentation explains how to do this for top level values however I'm struggling to retrieve the correct data for values that are within child objects.</p>
  
  <p>Sample JSON</p>
  
  <p><code>{
   "_id" : ObjectId("5c32646c9f3315c3e8300673"),
   "key" : "20190107",
          "__v" : 0,
          "chart" : [
                  {
                          "_id" : ObjectId("5c3372e5c35e924984f28e03"),
                          "volume" : "0",
                          "close" : "47.24",
                          "time" : "09:30 AM"
                  },
                  {
                          "_id" : ObjectId("5c3372e5c35e924984f28d34"),
                          "volume" : "50",
                          "close" : "44.24",
                          "time" : "09:50 AM"
                  }
          ]
  }</code></p>
  
  <p>I want to retrieve volumes greater than 10. I've tried</p>
  
  <p><code>db.symbols.find({"chart.volume": { $gt: 10 } } )</code></p>
  
  <p><code>db.symbols.find({"volume": { $gt: 10 } } )</code></p>
  
  <p>Any help appreciated.</p>