 <p>All MongoDB queries produce "key/value" pairs in the result document. All MongoDB content is basically a BSON document in this form, which is just "translated" back to native code form by the driver to the language it is implemented in.</p> <p>So the aggregation framework alone is never going to produce a bare array of just the values as you want. But you can always just transform the array of results, as after all it is only an array</p> <pre><code>var result = db.collection.aggregate(pipeline); var response = result.result.map(function(x) { return x._id } ); </code></pre> <p>Also note that the default behavior in the shell and a preferred option is that the aggregation result is actually returned as a cursor from MongoDB 2.6 and onwards. Since this is in list form rather than as a distinct document you would process differently:</p> <pre><code>var response = db.collection.aggregate(pipeline).map(function(x) { return x._id; }) </code></pre>