title: MongoDB selecting key value pairs using C# driver
body: <p>I have a MongoDB collection that looks similar to this: </p>
  
  <pre><code>{
    _id : 1,
    key : "key1",
    value : [ "val11", "val12"]
  }
  {
    _id : 2,
    key : "key2",
    value : [ "val21", "val22", "val23"]
  }
  </code></pre>
  
  <p>I'd like to get a List of MyObjects ( MyObject consisting of two string properties name and category) from this collection that'd look like this:</p>
  
  <pre><code>[{Category: "key1", Name: "val11"}, {Category: "key1", Name:"val12"}, 
  {Category: "key2", Name: "val21"}, {Category:"key2",Name:"val22"}, {Category: "key2", Name: "val23"}]
  
  public class MyObject
  {
      public string Name{ get; set; }
      public string Category { get; set; }
  }
  </code></pre>
  
  <p>I would be very grateful if someone could point me into the right solution, preferably using LINQ.</p>