
Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag storeThis is a JavaScript/TypeScript data traversal question rather than a Sanity-specific issue. Looking at your data structure, you need to access nested properties within the items array.
Based on your data structure, navigationItemUrl.internalLink contains the text property you want. Here's how to access it:
{navs.map((nav: any) => (
<div key={nav._id}>
<h3>{nav.title}</h3>
{nav.items?.map((item: any) => (
<div key={item._key}>
{item.navigationItemUrl?.internalLink?.text}
</div>
))}
</div>
))}The key points:
nav.items (the array of navigation items)navigationItemUrl objectinternalLink which contains your text property?.) to safely access nested propertiesitem._key as the key since each navigation item has that unique identifierIf you want to create actual links, you might do something like:
{navs.map((nav: any) => (
<nav key={nav._id}>
<h3>{nav.title}</h3>
<ul>
{nav.items?.map((item: any) => (
<li key={item._key}>
<a href={item.navigationItemUrl?.internalLink?.text}>
{item.text || item.navigationItemUrl?.internalLink?.text}
</a>
</li>
))}
</ul>
</nav>
))}TypeScript tip: Instead of using any, consider using Sanity TypeGen to generate proper types for your schema. This would give you autocomplete and type safety for these nested structures, making it much easier to work with complex data like this navigation structure.
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