When I try to use $documents operator in playground,
db.collection.aggregate([
{
"$documents": [
{
"test": 123
}
]
}
])
I get below error:
query failed: (InvalidNamespace) '$documents' can only be run with {aggregate: 1}
Playground to reproduce.
Alternatives that I have tried(but also failed):
Removing collection in db.collection.aggregate([...]): will get syntax error like:
Invalid query:
Line 1: Expected '.' instead of '('
Playground
What could be a correct way to use $documents in Mongo Playground?