© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
6 replies
Xane

Is there a way to use statePath with nested json-data?

Hello! I'm wondering if anyone knows if there is any way to use statePath to get nested json properties?

DB Field: "Nutrient"
JSON: {"Details": [{"NutrientTypeCode":"ENER-","Value1":"1724"}, ...]}

I would like to get "NutrientTypeCode".

This is what I've got so far, it shows me all the detail objects, but I don't know how to target the field I want:

Forms\Components\Section::make('Nutrient')->statePath('Nutrient')->schema([
      Forms\Components\TextInput::make('Details'),
]),
Forms\Components\Section::make('Nutrient')->statePath('Nutrient')->schema([
      Forms\Components\TextInput::make('Details'),
]),


This is as far I've gotten with it. I've tried "Details.NutrientTypeCode", but this doesn't give me any data.

Do I have to create my own form-field for this?

Thanks!
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Finding a way to apply translations to nested JSON
FilamentFFilament / ❓┊help
3y ago
Is there a way to cache table data?
FilamentFFilament / ❓┊help
7mo ago
Is there a way to use Heroicons inside HtmlString?
FilamentFFilament / ❓┊help
3y ago
Is there a way to use SelectFilter relationship with a json field?Ex name->en, name->fr etc
FilamentFFilament / ❓┊help
3y ago