title: Reading only the value from MongoDB database with C#
body: <p>I am trying to read random data from my MongoDB database and use only the &quot;word&quot; value without the hole object like I have:</p>
  <pre><code>{ &quot;_id&quot; : ObjectId(&quot;6161fecc143ec3890b16faea&quot;), &quot;word&quot; : &quot;create&quot; }
  </code></pre>
  <p>My code is simple:</p>
  <pre><code>MongoClient dbClient = new MongoClient(&quot;mongodb://localhost:27017&quot;);
              var DB = dbClient.GetDatabase(&quot;ForTwitter&quot;);
              var collection = DB.GetCollection&lt;BsonDocument&gt;(&quot;user&quot;);
              var words = collection.AsQueryable().Sample(1).FirstOrDefault();  
              Console.WriteLine(words.ToString() + &quot;\n&quot;);  
  </code></pre>
  <p>So this is how my collection is JSON and looks like from mongo.exe:</p>
  <pre><code>&gt; show collections
   user 
  &gt; db.getCollectionNames(); 
  [ &quot;user&quot; ] 
   
  </code></pre>
  <p>How can I only use the word value?</p>