Database

[{title:"Product 1",order:1,code:"A"},{title:"Product 2",order:2,code:"B"},{title:"Product 3",order:3,code:"A"},{title:"Product 4",order:4,code:"C"},{title:"Product 5",order:5,code:"D"},{title:"Product 6",order:6,code:"C"}]

Query

db.collection.update({},[{$set:{code:{$concat:["$code","1"]}}}],{multi:true})

Result