MongoDB aggregation commands #469
Answered
by
jmikrut
jokillinger
asked this question in
Q&A
-
Is it possible to use MongoDB aggregation commands in local queries? Like distinct() or count()? |
Beta Was this translation helpful? Give feedback.
Answered by
jmikrut
Mar 3, 2022
Replies: 1 comment 5 replies
-
Hey @Salomo — with the Payload Local API, this is currently not possible. But, you can do this via one of two ways:
Does this help you out? |
Beta Was this translation helpful? Give feedback.
5 replies
Answer selected by
jokillinger
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey @Salomo — with the Payload Local API, this is currently not possible. But, you can do this via one of two ways:
payload.collections[collectionSlug].Model
. Then, you can do whatever you can do with Mongoose.Does this help you out?