Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
以下のコマンドを使用して、連絡先コレクションのレコードを検索しています
db.contacts.find({"field1":"1"})
問題は、フィールド 1 のエイリアス名を SL.NO として使用したいことです。
私はこの方法を試しましたが、うまくいきません...
db.contacts.find({"field :n, as: :SL.NO" : "1"}
誰でもこの問題で私を助けることができますか?
ところで、私は現在mongo 1.6.5を使用しています
Mongoose などの一部のドライバーはその機能をサポートしていますが、MongoDB 自体または Mongo シェルにはそのような機能はありません。