Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

column to comma separated string in mongodb

db.collectionName.aggregate(
    [
        { "$addFields": { 
            "names": { "$split": [ "$names", "," ] } 
        }},
        {$out:"collectionName"}
    ]
)
 
PREVIOUS NEXT
Tagged: #column #comma #separated #string #mongodb
ADD COMMENT
Topic
Name
1+8 =