How could I find an image by id in this Schema. I have the id of the User and the id of the image I am looking for. What would be the best way to do this and do all images in th
When you are interested in the full object it is a simple find
:
.find({"facebook.id":"", "images.id":})
I don't think that there is a way to reduce the image array in the result.
To update a single element in the image array you can use this:
.update({"facebook.id":"", "images.id":}, {$set : {"images.$.main" :false} } );