title: MongoDB: How to convert an int array to strings
body: <p>I want to convert an int array to strings.
  My int:</p>
  
  <pre><code>"key" : 280
  </code></pre>
  
  <p>If I have only 1 integer to change i can use:</p>
  
  <pre><code>db.collection.find( { 'key' : { $type : 16 } } ).forEach( function (x) { x.key = ""+x.key; db.collection.save(x);});
  </code></pre>
  
  <p>$type 16 describes an 32-bit integer. With that code all looks fine.</p>
  
  <p>But if I have an array like:</p>
  
  <pre><code>"key" : 280, 193, 213
  </code></pre>
  
  <p>and I use this code I get:</p>
  
  <pre><code>"key" : "280,193,213"
  </code></pre>
  
  <p>but I want -> <code>"key" : "280","193","213"</code></p>
  
  <p>Have anybody an solution ? </p>