title: Add new data to existing collection in mongo in java
body: <p>I need two to add new items to the existing data in mongo db.</p>
  
  <p>This is mongo db I have the following data.</p>
  
  <pre><code>  {
      "_id" : ObjectId("53ce11e7d0881d32d9fa935f"),
      "name" : "massive riots",
      "lastFeachedTime" : "Jul 15, 2014 12:55:27 PM"
    }
  </code></pre>
  
  <p>Here I have to find the data based on name and the I have to add another two items two it.</p>
  
  <p>Here is my code.</p>
  
  <pre><code>     DBObject queryObject = new BasicDBObject().append("name", keyword);
          if (null == newFetchTime) {
  
          }
          DBObject updateObject = new BasicDBObject();
          updateObject.put("nextPageToken", nextPageToken);
          updateObject.put("prevPageToken", prevPageToken);
          Utils utils = new Utils();
          DBCollection collection = utils.getStaging().getCollection("test");     
          collection.update(queryObject, updateObject, true, false);
  </code></pre>
  
  <p>But I am do update the existing value get removed and the new data get added.</p>
  
  <p>Can any one tell me how to add the items to the existing data in mongo db.</p>