title: Insert array into existing document in mongoDB using Java
body: <p>I have a document like this:</p>
  
  <pre><code>{
       "_id" : ObjectId("58b1404d002d2b1a481b8ddf"),
       "firstName" : "ABC",
       "lastName" : "XYZ"
  }
  </code></pre>
  
  <p>And I have a list named topics:</p>
  
  <pre><code>List&lt;String&gt; topics = new ArrayList&lt;String&gt;();
  topics.add("Business");
  topics.add("Technology");
  topics.add("Sports");
  topics.add("Career");
  </code></pre>
  
  <p>Now, I want to update my document like this:</p>
  
  <pre><code>{
       "_id" : ObjectId("58b1404d002d2b1a481b8ddf"),
       "firstName" : "ABC",
       "lastName" : "XYZ",
       "readAbout" : ["Business", "Technology", "Sports", "Career"]
  }
  </code></pre>
  
  <p>I tried some ways but ended up with many errors. I am new in this. Please can anyone suggest me how to do this?</p>