🔮 Sanity Create is here. Writing is reinvented. Try now, no developer setup

How to access the actual value of a reference in a document in Sanity.io.

2 replies
Last updated: May 15, 2024
One of my documents is just showing a reference instead of the actual reference value. how can I get the actual value?

origin: 
  _ref: "1ec9e722-3636-490d-9094-e102a4fca275"
  _type: "reference"
May 15, 2024, 7:27 PM
I’ve figured I need to use the arrow syntax to access the ref values.
"variations": variations[0].origin -> name
. How would I ensure all origins within the variations array return the name field ?
May 15, 2024, 8:04 PM
This is resolved now
May 15, 2024, 8:19 PM

Sanity– build remarkable experiences at scale

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

Was this answer helpful?