Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

mongodb replace root

db.collection.aggregate([   { $replaceRoot: { newRoot: "$name" } }])
Source by docs.mongodb.com #
 
PREVIOUS NEXT
Tagged: #mongodb #replace #root
ADD COMMENT
Topic
Name
1+5 =