πŸ‘€ See Sanity in action: Watch product demo now β†’

How to get all the Type Names in a Dataset

1 replies
Last updated: Nov 19, 2021
How could I get all the type names used in my dataset? Something like "select distinct"...
Nov 19, 2021, 9:33 AM
in vision you can select vX as api version and then you can get all types like so:

distinct(*{ _type }._type)
Nov 19, 2021, 10:06 AM

Sanity.io – build remarkable experiences at scale

Sanity is a customizable solution that treats content as data to power your digital business. Free to get started, and pay-as-you-go on all plans.

Categorized in