printing data other than in mongo using aggregation frame work

From: shankar gandhi <shankar.gandhi248@xxxxxxxxx>
To: mongodb-user <mongodb-user@xxxxxxxxxxxxxxxx>
Date: Sun, 24 Apr 2016 09:28:35 -0700 (PDT)
Why ads?
I am trying to print data apart from fields used in $group but didn't found 
any way.

for e.g my query is 

     db.test.aggregation({"$project": "status":1,"cost":1 },{"$group":{_id: 
"name","cost"}})

it will print only "cost" not "status". Let me know hot to do it in mongo

-- 
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.

For other MongoDB technical support options, see: https://docs.mongodb.org/manual/support/
--- 
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user+unsubscribe@xxxxxxxxxxxxxxxx.
To post to this group, send email to mongodb-user@xxxxxxxxxxxxxxxx.
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/20c8fc1a-b82b-4055-aaea-14541914ae4a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Why ads?