This should be pretty simple.
myobjecthas various properties, _id, name, createdBy, dateetc.
In my search query, I only want to return specific fields from myObject. So, for example, what do I need to do to change the search query below to return only name?
myCollection.find({createdBy: someId}, {fields: {myObject: 1}}).fetch();
Currently, this will return everything to myobjectwhat it should do, I just need to return one field inside myobject.
source
share