i have the following 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")) ;
}
This outputs:
You are currently registered for the following modules:
[ "DigitalLogic" "OperatingSystems" , "FundamentalsCSE"]
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?