title: MongoDB concatenate strings from two fields into a third field
body: <p>How do I concatenate values from two string fields and put it into a third one?</p>
  
  <p>I've tried this:</p>
  
  <pre><code>db.collection.update(
    { "_id": { $exists: true } },
    { $set: { column_2: { $add: ['$column_4', '$column_3'] } } },
    false, true
  )
  </code></pre>
  
  <p>which doesn't seem to work though, and throws <code>not ok for storage</code>.</p>
  
  <p>I've also tried this:</p>
  
  <pre><code>db.collection.update(
    { "_id": { $exists : true } },
    { $set: { column_2: { $add: ['a', 'b'] } } },
    false, true
  )
  </code></pre>
  
  <p>but even this shows the same error <code>not ok for storage</code>.</p>
  
  <p>I want to concatenate only on the mongo server and not in my application.</p>