Access JSON and display in a table
Hey, probably I am overlooking something really obvious.
I have a table and in that want to access a JSON that is stored in a database column in another model.
When trying to debug with log::info it is displaying me the info correctly, but I am not sure how to let ->query use the data in the JSON
My code for accessing the JSON looks like this:
For the log::info I receive back my test entry of
"[{"shift_id":1,"shift_type":"TestType","shift_description":"TestDescription","shift_duration":25,"shift_date":"2024-11-27","shift_supervisor":["John Doe"]}]"
1 Reply
Maybe try to remove the outer
[]
before passing it to the query()
function?
{"shift_id":1,"shift_type":"TestType","shift_description":"TestDescription","shift_duration":25,"shift_date":"2024-11-27","shift_supervisor":["John Doe"]}
The answer I am giving is from here (I think it may help you):
https://github.com/filamentphp/filament/discussions/11140GitHub
How can I display json data in a table · filamentphp filament · Dis...
Package Table builder Package Version v3 How can we help you? Hi, there is a market_position field in the table. It stores json [{"symbol":"BTCUSDT","side":"long/...