title: mongodb : Return array of values into a variable
body: <p>I come from RDBMS background and finding it difficult to get myself aligned with mongodb and have been struggling to generate just the array of values. Once i get the array, I need to use these array values in $condition clause of aggregate function using $in</p>
  
  <p>I have a collection which returns me :</p>
  
  <pre><code>db.Users.find({user_id : 1623}, { "Friends" : 1, _id : 0})
  </code></pre>
  
  <p>And content:</p>
  
  <pre><code>{ "Friends" : [ 708, 784, 1495, 212, 1918, 2007, 1439, 1634, 649 ] }
  </code></pre>
  
  <p>I would only require the array of values than document type:</p>
  
  <pre><code>[ 708, 784, 1495, 212, 1918, 2007, 1439, 1634, 649 ] 
  </code></pre>
  
  <p>Is there a easier way to achieve this.</p>