Sort by one field but return a different field

Assuming this is the default reactive var I need:

this.myVar = new reactiveVar(TheCollection.findOne({}, {fields: {_id: 1}}));

But the first item it finds should be if the collection is first sorted by {title:1}.
What’s the right way to get it so?

this.myVar = new ReactiveVar(TheCollection.findOne({}, {fields: {_id: 1}, sort: {title: 1}, limit: 1}));

(not entirely sure if the limit:1 is strictly necessary)

1 Like