Is there a built in way to filter the fields provided by the API response of a collection? I’m using Nuxt.js to statically generate a site and it needs a list of the slugs in an “slug”: “this-is-a-slug” type format. Can I filter the API results to ONLY show that field that are built into the API?
I saw the fields option but it’s not really documented as to what it does.
Hello the fields field you can find it here the documentation.
Link: Mongolite User Manual
But this won’t return you an array of slugs anyway.
If you want to have custom bees you have to create in the “config” folder an “api” folder with your custom files inside that return the data as you want.