title: Retrieve array values from mongodb with Java
body: <p>i have the following code : </p>
  
  <pre><code>DBCollection collsc = db.getCollection("StudentCourses") ;
  BasicDBObject querysc = new BasicDBObject("StudentID",id ); 
  DBCursor curssc = collsc.find(querysc);
  
  while(curssc.hasNext()) {
  
      DBObject e = curssc.next();
      System.out.println("You are currently registered for the following modules: ") ; 
      System.out.println(e.get("CoursesRegistered")) ; 
  
  }
  </code></pre>
  
  <p>This outputs: </p>
  
  <pre><code>You are currently registered for the following modules: 
  [ "DigitalLogic" "OperatingSystems" , "FundamentalsCSE"]
  </code></pre>
  
  <p>However i want only the values to be returned from the array, i.e, DigitalLogic, OperatingSystems and FundamentalsCSE. I will use these values to populate a JList. Help please? </p>