Create JSON Object and Array

suggest change

JSON_OBJECT creates JSON Objects:

SELECT JSON_OBJECT('key1',col1 , 'key2',col2 , 'key3','col3') as myobj;

JSON_ARRAY creates JSON Array as well:

SELECT JSON_ARRAY(col1,col2,'col3') as myarray;

Note: myobj.key3 and myarray[2] are “col3” as fixed string.

Also mixed JSON data:

SELECT JSON_OBJECT("opening","Sicilian", "variations",JSON_ARRAY("pelikan","dragon","najdorf") ) as mymixed ;

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents