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 |