You can insert new list item using the $push operator.
You can run the following command on the shell to add new list item.
db.myObject.update({"myId" : "A String ID that i created"},{$push:{myList: {myString:"new string", myInteger:9003}}})
You can add list item using Java Driver as follows.
DBCollection coll = db.getCollection("myObject");
DBObject query = new BasicDBObject("myId", "A String ID that i created");
DBObject listItem = new BasicDBObject();
listItem.put("myString", "my new string");
listItem.put("myInteger", 9003);
DBObject updateObj = new BasicDBObject("myList", listItem);
coll.update(query, new BasicDBObject("$push", updateObj));
You can get single element as follows on the shell.
db.myObject.find({"myList.myInteger" : 9003}, {"myList.$" : 1})
From Java Driver you can run same code as follows :
DBCursor cur = coll.find(new BasicDBObject("myList.myInteger", 9003), new BasicDBObject("myList.$", 1));
You can remove object as follows :
db.nested.update({"myId" : "A String ID that i created"},{$pull:{myList: {myString:"new string", myInteger:9003}}})
In Java you can do it as follows :
DBCollection coll = db.getCollection("myObject");
DBObject query = new BasicDBObject("myId", "A String ID that i created");
DBObject listItem = new BasicDBObject();
listItem.put("myString", "my new string");
listItem.put("myInteger", 9003);
DBObject updateObj = new BasicDBObject("myList", listItem);
coll.update(query, new BasicDBObject("$pull", updateObj));
PS : Currently it is not possible to update all items in an array. There is an open issue on the Jira. You can check it from JIRA-1243