mongoDB : updating an objects using dot notation (multi-level object)
问题 I have an object with the following form : { "_id": ObjectId("4fa43f4d1cf26a6a8952adf1"), "userId": "1", "facebookId": "1234", "groups": [{ "groupName": "testGroup", "members": [{ "memberFirstName": "userFirstName", "memberLastName": "userLastName", "memberDetails": { "userId": "1", "faceBookId": "1234" } }] }] } It's a collection that holds for each user - its groups, with each group containing the group members... So the "groups" key is an array (or list), and so is the "members" key. (each