Converting form column to JSON?

Having some issues with filling a column out called productDetails, it's set up to accept json and I've been doing it fine with straight laravel by means of json_encode to write and json_decode to read

but in Filament, the only thing I'm able to do is write a string to the productDetails column when I edit a product, creating a product it gives me an Array to string conversion exception, I've tried to use the save function to do this (chatGPT may have this wrong because I'm not getting any logs)

Hopefully the code will make more sense, I've also provided an example of what it's meant to look like in the DB.

https://gist.github.com/tommmoe/5a33c7057d5081f985cb74fb08934d9d#file-gistfile1-txt
Gist
json fields. GitHub Gist: instantly share code, notes, and snippets.
Solution
That's how it's encoded but when you decode it it should be correct? Are the items part of a repeater? Then. would make them as you want them I believe
Was this page helpful?