title: MongoDB + C#: Query inside a document
body: <p>It seems I don't understand how I can get a value from a collection inside a document. I am using mongoDB in C#.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>var jimi = new Document();
  
  jimi["Firstname"] = "Jimi";
  jimi["Lastname"] = "James";
  jimi["Pets"] = new[]
  {
      new Document().Append("Type", "Cat").Append("Name", "Fluffy"),
      new Document().Append("Type", "Dog").Append("Name", "Barky"),
      new Document().Append("Type", "Gorilla").Append("Name", "Bananas"),
  };
  
  test.Insert(jimi);
  
  var query = new Document().Append("Pets.Type","Cat");
  </code></pre>
  
  <p>So my query will look for the pet cat. But I am not sure how I can get the name of my cat. I tried a few things but I mostly get the whole document back.</p>
  
  <p>Thanks in advance,</p>
  
  <p>Pickels</p>