Updating nested arrays in mongodb
Here’s the big question, do you need to leverage Mongo’s “addToSet” and “push” operations? If you really plan to modify just individual items in the array, then you should probably build these arrays as objects. Here’s how I would structure this: { id: 1, items: { “2” : { “blocks” : { “3” : { … Read more