I'm new to Symfony and still learning. I'm working currently on a Symfony application where I have a table that represents projects and every project have id, title, startDate, endDate and fields where fields is a JSON field that contains data representing differents columns that are custom to the project and can be added, updated or deleted by a user.
The data inside that field is like this:
{
"columns": {
"column1": "string",
"column2": "integer"
},
"rows": [
{
"column1": "foo",
"column2": 22
},
{
"column1": "bar",
"column2": 23
}
]
}
"columns" represents custom columns added to a specific project and "rows" represents the data in every column. "string" and "integer" represent data type in every column.
My Question:
I can extract the columns and values using DoctrineJsonFunctions and I'm using EasyAdmin 3, but my question is how can I read the project columns when viewing project details knowing that every project may have different columns? Or is there any better solution than using JSON field? Thank you in advance!