my code is :
result = await mongoDBO.collection(collectionName).find({id: data.id},{projection : {'_id' : 0}}).toArray();
But I get the following error
Unsupported projection option: projection: { _id: 0 }
my code is :
result = await mongoDBO.collection(collectionName).find({id: data.id},{projection : {'_id' : 0}}).toArray();
But I get the following error
Unsupported projection option: projection: { _id: 0 }
2
Answers
I also tested this way and it worked
Remove
projection
property. Just send the projection object: