You can use the aggregate framework as below
db.mycollection.aggregate([{$ project:{'alias':"$fieldName"} }])
How to represent a field name alias in Mongodb JSON query? Is it supported in the C# driver? Thanks
Anoop Madhusudanan
Microsoft MVP, Client App Dev
http://amazedsaint.com
댓글 없음:
댓글 쓰기