© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago•
5 replies
FullyLoadedTech

Table search/filter by json array?

My model has a json attribute which is cast to an array. Filament Table can display this value in a list. However if I add ->searchable() it produces errors, and if I create a SelectFilter it does not effect the query after selection. Is there a trick to searching and filtering by json data attributes?
Solution
I figured out a partial solution... for the TextColumn::make('myjson.myattribute') and then for SelectFilter::make('myjson->myattribute') works. This still results in an error if you use ->searchable() on the TextColumn but at least the SelectFilter is working with just typecasting the json to array. Was unaware of Eloquent's
->
->
notation for where queries.
Jump to solution
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

Filter Table by Querystring
FilamentFFilament / ❓┊help
2y ago
Reposition Filter, search , sort by
FilamentFFilament / ❓┊help
16mo ago
filter json to the table
FilamentFFilament / ❓┊help
16mo ago
Array/Json to Table Panel
FilamentFFilament / ❓┊help
9mo ago