How does one retrieve content with the API such that nested fields are selected in the projection?
As an example, say you have a tree object that contains a name field and an image field, among others. From the API playground, you might put something like this into the fields parameter:
{name: 1, image: 1}
which would return the name field and the entire image field. But how would you return just the name field and the image’s title sub-field – and not things like the image’s height and width? I’ve tried a couple of syntax variations:
{name: 1, 'image.title': 1}
{name: 1, image: {title: 1}}
but neither works. The first one returns the name and top-level _id fields, while the second one returns the same thing but adds in the entire image. So they both seem to be recognized and do affect the output, but neither accomplishes the objective of selectively pulling image sub-fields.