title: MongoDB aggregation: How to extract the field in the results
body: <p>all!</p>
  
  <p>I'm new to MongoDB aggregation, after aggregating, I finally get the result:</p>
  
  <pre><code>"result" : [
      {
          "_id" : "531d84734031c76f06b853f0"
      },
      {
          "_id" : "5316739f4031c76f06b85399"
      },
      {
          "_id" : "53171a7f4031c76f06b853e5"
      },
      {
          "_id" : "531687024031c76f06b853db"
      },
      {
          "_id" : "5321135cf5fcb31a051e911a"
      },
      {
          "_id" : "5315b2564031c76f06b8538f"
      }
  ],
  "ok" : 1
  </code></pre>
  
  <p>The data is just what I'm looking for, but I just want to make it one step further, I hope my data will be displayed like this:</p>
  
  <pre><code>"result" : [
       "531d84734031c76f06b853f0",
       "5316739f4031c76f06b85399",
       "53171a7f4031c76f06b853e5",
       "531687024031c76f06b853db",
       "5321135cf5fcb31a051e911a",
       "5315b2564031c76f06b8538f"
  ],
  "ok" : 1
  </code></pre>
  
  <p>Yes, I just want to get all the unique id in a plain string array, is there anything I could do? Any help would be appreciated!</p>