
Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag storeI can see your query syntax industries[]->{title} is actually correct GROQ! The issue is with how conditional projections work within nested array projections.
The problem is that when you use _type == 'industries' => {...} inside an array projection, the conditional completely replaces the object when true. Without the spread operator (...), you only get back what you explicitly define in that conditional block, which is why you're seeing just _ref, _key, and _type without the dereferenced titles.
Here's the corrected query:
*[_type == "landingPage" && slug.current == "get-started"][0]{
landingPageBuilder[] {
_type == 'industries' => {
...,
industries[]->{title}
}
}
}Why this works:
...) preserves all the original fields from the landingPageBuilder itemindustries[]->{title} is valid GROQ - it dereferences each reference in the array and projects only the title fieldarray[]->{fields} correctly dereferences arrays of references with projectionAlternative if you only need title strings:
If you want a flat array of title strings instead of objects with title properties:
*[_type == "landingPage" && slug.current == "get-started"][0]{
landingPageBuilder[] {
_type == 'industries' => {
...,
"industries": industries[]->title
}
}
}Note the difference: industries[]->title (without curly braces) gives you ["Title 1", "Title 2"], while industries[]->{title} gives you [{title: "Title 1"}, {title: "Title 2"}].
The key takeaway: conditional projections inside array projections need the spread operator to preserve existing fields, otherwise you only get what you explicitly project in the conditional block. Your dereference syntax was correct all along!
Sanity is the developer-first content operating system that gives you complete control. Schema-as-code, GROQ queries, and real-time APIs mean no more workarounds or waiting for deployments. Free to start, scale as you grow.
Content operations
Content backend


The only platform powering content operations
By Industry


Tecovas strengthens their customer connections
Build and Share

Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag store