TanStackDB
Framework
StartRouter
Data & State
QueryDBStoreAI
UI
TableChartsFormMarkdownHighlight
UX
VirtualPacerHotkeys
Tooling
DevtoolsConfigCLIIntent
Blog
Blog & Release Notes
About
YouTubeThe official TanStack channel.WorkshopsLive sessions from the maintainers.Release NotesThe latest releases and changelog.
Channels
DiscordReal-time community support.GitHubSource, issues, discussions, and releases.
People & Work
MaintainersMeet the people maintaining the stack.ShowcaseProjects selected by the TanStack team.Community projects
TanChatNEW
Tools
Application StarterAlphaGenerate TanStack app starters.StatsNPM and ecosystem usage data.
Merch
Support
Support OverviewFind the right support path.PartnersCompanies supporting TanStack.OSS SponsorsSponsors keeping TanStack open source.Enterprise SupportPrivate consulting and expert support.ContactGet in touch with the TanStack team.
About
EthosHow we approach open source.TenetsThe values that shape TanStack libraries.Design SystemLogos, tokens, and UI components.
Partners

Sponsorships, placements, and partner pages.

Work with
TanStack
Partnership Inquiry
Sign In
DB Docs
  • Home
  • Get Started
  • Guides
  • API
API Reference
  • Core API Reference
  • Collection
  • createCollection
  • liveQueryCollectionOptions
  • createLiveQueryCollection
  • createOptimisticAction
  • createTransaction
  • Electric DB Collection
  • electricCollectionOptions
  • Query DB Collection
  • queryCollectionOptions
  • RxDB DB Collection
  • rxdbCollectionOptions
  • PowerSync Collection
  • powerSyncCollectionOptions
  • createIndexedDB
  • indexedDBCollectionOptions
  • React Hooks
  • useLiveQuery
HomeGet StartedGuidesAPI
API Reference
  • Core API Reference
  • Collection
  • createCollection
  • liveQueryCollectionOptions
  • createLiveQueryCollection
  • createOptimisticAction
  • createTransaction
  • Electric DB Collection
  • electricCollectionOptions
  • Query DB Collection
  • queryCollectionOptions
  • RxDB DB Collection
  • rxdbCollectionOptions
  • PowerSync Collection
  • powerSyncCollectionOptions
  • createIndexedDB
  • indexedDBCollectionOptions
  • React Hooks
  • useLiveQuery
AI/LLM: This documentation page is available in plain markdown format at/db/latest/docs/reference/functions/extractFieldPath.md

extractFieldPath

ts
function extractFieldPath(expr): FieldPath | null;

Defined in: packages/db/src/query/expression-helpers.ts:110

Extracts the field path from a PropRef expression. Returns null for non-ref expressions.

Parameters#

expr#

BasicExpression

The expression to extract from

Returns#

FieldPath | null

The field path array, or null

Example#

ts
const field = extractFieldPath(someExpression)
// Returns: ['product', 'category']
Edit on GitHub
NextCore API Reference

On this page

  • Parameters
  • expr
  • Returns
  • Example
PartnersBecome a Partner
Gold
RailwayRailway
RenderRender
LovableLovable
NetlifyNetlify
CodeRabbitCodeRabbit
VercelVercel
CloudflareCloudflare
Silver
WorkOSWorkOS
AG GridAG Grid
OpenRouterOpenRouter
ClerkClerk
SerpApiSerpApi
Bronze
UnkeyUnkey
SentrySentry
Scarf
PrismaPrisma
Latest Posts

The open source application stack for the web.

Libraries

  • Browse all
  • Query
  • Router
  • Start
  • Table
  • Form

Blog

  • Latest posts
  • Release notes
  • YouTube
  • Workshops

Community

  • Discord
  • GitHub
  • Maintainers
  • Showcase
  • Community projects

Tools

  • Builder
  • Stats

Merch

  • Shop
  • Cart

Support

  • Support overview
  • Partners
  • OSS sponsors
  • Enterprise support
  • Contact
  • Ethos
  • Tenets
  • Design system

© 2026 TanStack LLC

  • Privacy
  • Terms