09 Oct How to covert a MongoDB string field to an array Posted at 10:44h in javascript, mongodb by louis 0 Comments 0 Likes db.collection.find().forEach(function(myDocument) { db.collection.update( { _id: myDocument._id }, { "$set": { "fieldToUpdate": [myDocument.fieldToUpdate] } } ); })
No Comments