Database

[{"key":1},{"key":2}]

Query

db.collection.update({},[{$set:{key:{$toString:"$key"}}}],{multi:true})

Result