Hi Abu,
I have a database column that contains a Json array and need to convert it so that each element of the array
can be displayed as a separate line in a grid.
For example the json column in the database might have the following:
[{“appName”:”A”,”appType”:3},{“appName”:”b”,”appType”:4}]
I would like for it to display appName and appType as the column headers with the appropriate data associated with it as editable rows.
Any thoughts and example code would be greatly appreciated.
Mark
Hi,
You can fetch this data from database using php-mysql standard functions and convert it in php array. This array can be supplied as datasource for grid.
To load grid from array, you can review demos/loading/load-array.php
Demo: https://gist.github.com/gridphp/af7ce29b851a125ad0af787ddd4d1dba