title: get only a particular field from embedded array object in mongodb collection
body: <p>I'm having a MongoDB collection which looks same as below document and I wanted to find only one field values count which presents within the embedded array object.</p>
  
  <p>I tried below query to fetch the data but doesn't work</p>
  
  <pre><code>db.mycollection.find({'quizzes':{skill:'html'}}).pretty()
  </code></pre>
  
  <p>below is the mongo document structure with sample value. the structure is the same as my original document</p>
  
  <pre><code>{
  
  "user": "values",
  
  "date": "234-234-234-234",
  
  "quizzes":[
  
     {
  
       "skill": "html",
       "score": "12"
  
  }
  
  ]
  
  }
  </code></pre>
  
  <p>From the above document, I wanted to fetch only the skill field values which present within quizzes array which is an embedded document. 
  my output should be like</p>
  
  <pre><code>{
  "html": 10,
  "php": 20,
  "C#": 15,
  "java": 18,
  .
  .
  .
  .
  .
  
  }
  </code></pre>