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.
mongodb では、コレクションから個別のレコードを取得するコマンドを実行すると、各レコードのキー値のみが返され、レコード データ全体は提供されません。
MongoDb のドキュメントから:
distinct コマンド return は、コレクション全体で指定されたキーの個別の値のリストを返します。
オブジェクト全体を返すのではなく、個別の値のリストを返します。こちらのドキュメントを参照してください。
詳細については、例を示して詳細に説明してください。