Can anyone help me with my MongoDB query issue?
I've recently started working with mongoDB and I'm having trouble getting just one field back for all my documents.
var docs = db.collection("articles").find({}, { _id: 0, title:1}).asArray();
Despite specifying that I only want the "title" field in the projection, the query is returning all fields. There are no errors but I can't figure out what's wrong. Maybe someone else can spot the mistake I'm missing?
Any assistance would be greatly appreciated!
For reference, I'm using the Stitch API from mongoDB Atlas.