以下のように集計操作を使用します:
db.collection.aggregate([
{$project:{"name_surname":{$concat:["$name","-","$surname"]},"name":1,"surname":1}}
])
以下のように集計操作を使用します:
db.collection.aggregate([
{$project:{"name_surname":{$concat:["$name","-","$surname"]},"name":1,"surname":1}}
])