title: select specific field in nested array in mongodb using c#
body: <p>My application accesses a mongodb using the .net c# driver.</p>
  
  <p>My data structure looks like this:</p>
  
  <pre><code>{
   "_id" : ObjectId("53d97351e37f520a342e152a"),
    "Name" : "full question test 2",
    "keywords" : ["personality", "extraversion", "agreeableness"],
     "Questions" : [{
       "type" : "likert",
        "text" : "question 1",
         }, 
         {
        "type" : "likert",
        "text" : "question 2",
        }]
  }
  </code></pre>
  
  <p>What I want to do is to select only the type column from the questions array.</p>
  
  <p>Here is my linq code now:</p>
  
  <pre><code>from e in collection.AsQueryable&lt;scales&gt;() 
  where e.Name == "full question test 2"
  select new { e.Id, e.Name, e.Questions}
  </code></pre>
  
  <p>This returns all the question properties (both type and text). I want just the type. I can do this by saying something like e.Questions[0].text,e.Questions[1].text.</p>
  
  <p>But the number of questions varies from file to file, so I'd love a solution that doesnt require this manual coding.</p>
  
  <p>Open to ideas! </p>