title: How to change field or update fast in MongoDB?
body: <p>Document is this</p>
  
  <pre><code>{title:"here", lat:123.4512, lng:36.3423, time:"2011-01-02"}
  </code></pre>
  
  <p>i want chane Document like this </p>
  
  <pre><code>{title:"here", {latlng: {lat:123.4512, lng:36.3423}}, time:"2011-01-02"}
  </code></pre>
  
  <p>so i will try this by mongodb console.</p>
  
  <pre><code>db.coll.find().forEach(function(u){
    u.latlng = {"lat":u.lat, "lng":u.lng};
    db.coll.save(u);
    db.coll.update(u, {$unset:{"map_x1":1, "map_y1":1}});
  })
  </code></pre>
  
  <p>but it's very slow T.T</p>
  
  <p>i think another solution</p>
  
  <pre><code>db.coll.find().forEach(function(u){
    db.coll.update(u, {{"latlng" : {"lat":u.lat, "lng":u.lng}}, $unset:{"lat":1, "lng":1}});
  })
  </code></pre>
  
  <p>but i can't run it. because first solution is still running ....</p>
  
  <p>do you have any fast solution like this job?</p>