Articles → MONGODB → $Concat Aggregation Operator In MongoDB
$Concat Aggregation Operator In MongoDB
Purpose
Example
db.Employees.aggregate([
{
$project: {
fullName: { $concat: ["$firstname", " ", "$lastname"] }
}
}
])
Output
Posted By - | Karan Gupta |
|
Posted On - | Monday, June 3, 2024 |