(MongoDB Java) $push into array
DBObject listItem = new BasicDBObject(“scores”, new BasicDBObject(“type”,”quiz”).append(“score”,99)); DBObject updateQuery = new BasicDBObject(“$push”, listItem); myCol.update(findQuery, updateQuery);
DBObject listItem = new BasicDBObject(“scores”, new BasicDBObject(“type”,”quiz”).append(“score”,99)); DBObject updateQuery = new BasicDBObject(“$push”, listItem); myCol.update(findQuery, updateQuery);