Grouping fields datas into a json array like for blocks and structures

Hello wonderful people,

For some practical reason, I would love to know if it is possible to store separated fields values into a json array like for blocks and structure.

I have been looking for an answer without any solution, but my level is more mid/intermediary than advanced.

The sample page here:

The current output in the text file

A quick exemple of the ideal case (The json is formated here for readibility reason for this question only)

If it is not available, I think it would be quite practical. Especially with pages with plenty of grouped content (ex: tabs like in this exemple)

Thank you a lot

I think it could be done via a Page model (similar to how Virtual pages work), but wondering if that’s worth the effort.

Thanks!

I will look into that solution. I think I might achieve what I am looking for with it!

C.

A simpler approach would be to store the stuff like normal, but create the necessary combined methods, e.g. a header method, in a page model that converts the single fields into the desired structure. Unless you really want the stuff stored as JSON for some reason.