Articles → MONGODB → $Toupper Aggregation Operator In Mongodb

$Toupper Aggregation Operator In Mongodb






Purpose





Example




Picture showing the sample document collection




db.Employees.aggregate([
    {
        $project: {
            firstname: 1,
            upperFirstname: { $toUpper: "$firstname" }
        }
    }
])



Output


Picture showing the output of $toupper aggregation operator in mongodb





Posted By  -  Karan Gupta
 
Posted On  -  Monday, June 3, 2024

Query/Feedback


Your Email Id
 
Subject
 
Query/FeedbackCharacters remaining 250