F
Filamentβ€’12mo ago
MikeG

Best practice working with JSON fields in model & Table Builder

Hello! Im trying to make a table widget, but im confused on how I can get values that live within a JSON column to be shown.. I have a JSON column called payload which for example contains {"foo": "bar", "example2": "value2"} How do I now have 2 columns in the table builder that are TextColumns which show the values from "foo" and "example2" ?
Solution:
Ah, it was as simple as doing payload.key
Jump to solution
5 Replies
MikeG
MikeGOPβ€’12mo ago
Anyone have any idea ?
Solution
MikeG
MikeGβ€’12mo ago
Ah, it was as simple as doing payload.key
Mikail
Mikailβ€’9mo ago
This helped me too thanks
MikeG
MikeGOPβ€’9mo ago
Glad it was helpful πŸ˜„
rabol
rabolβ€’5mo ago
But how to make it work in a form?
Want results from more Discord servers?
Add your server