I am trying to change the type of a field from within the mongo shell.
I am doing this...
db.meta.update( {\'fields.properties.default\': { $type :
To convert int32 to string in mongo without creating an array just add "" to your number :-)
db.foo.find( { 'mynum' : { $type : 16 } } ).forEach( function (x) { x.mynum = x.mynum + ""; // convert int32 to string db.foo.save(x); });