How do I concatenate values from two string fields and put it into a third one?
I\'ve tried this:
db.collection.update( { \"_id\": { $exists: true
You can also follow the below.
db.collectionName.find({}).forEach(function(row) { row.newField = row.field1 + "-" + row.field2 db.collectionName.save(row); });