Purpose
JSON_ARRAY() evaluates a (possibly empty) list of values and returns a JSON array that contains these values.
Syntax
JSON_ARRAY([val[, val] ...])
Description
val is a value that you want to convert into a JSON value.
Examples
obclient> SELECT JSON_ARRAY(1, "abcd", NULL, TRUE, CURTIME(),'[a,b,c]','{"d":100}');
+---------------------------------------------------------------------+
| JSON_ARRAY(1, "abcd", NULL, TRUE, CURTIME(),'[a,b,c]','{"d":100}') |
+---------------------------------------------------------------------+
| [1, "abcd", null, true, "21:49:37.000000", "[a,b,c]", "{\"d\":100}"]|
+---------------------------------------------------------------------+
1 row in set
obclient> SELECT JSON_ARRAY(NULL);
+------------------+
| JSON_ARRAY(NULL) |
+------------------+
| [null] |
+------------------+
1 row in set
obclient> SELECT JSON_ARRAY();
+--------------+
| JSON_ARRAY() |
+--------------+
| [] |
+--------------+
1 row in set