Did you know that you can get JSON data directly from your SQL tables?
Let me introduce you to 2 useful SQL functions that are used to retrieve JSON data from SQL queries - JSON_ARRAY and JSON_OBJECT.
You can use those functions in the SELECT statement with other types of select items, and they can be specified in other locations where an SQL function can be used, such as in a WHERE clause
The JSON_ARRAY function takes a comma-separated list of expressions and returns a JSON array containing those values.