@jerad
To convert JSON object rows into a JSON array in MySQL, you can use the following steps:
1
|
SET SESSION group_concat_max_len = 1000000; |
1 2 |
SELECT CONCAT('[', GROUP_CONCAT(json_column), ']') AS json_array FROM your_table; |
Replace json_column
with the actual name of the column that contains the JSON objects and your_table
with the name of your table.
Note: Make sure your JSON objects in the database are stored correctly as valid JSON before using this method.