Använd aggregeringsoperationerna enligt nedan:
db.collection.aggregate([
{$project:{"name_surname":{$concat:["$name","-","$surname"]},"name":1,"surname":1}}
])
Använd aggregeringsoperationerna enligt nedan:
db.collection.aggregate([
{$project:{"name_surname":{$concat:["$name","-","$surname"]},"name":1,"surname":1}}
])