Functions That Modify JSON Values mysql>  SET @j = ’{ "a": 1, "b": [2, 3]}’; mysql>  SELECT JSON_INSERT(@j, ’$.a’, 10, ’$.c’, ’[true, false]’); +----------------------------------------------------+ | JSON_INSERT(@j, ’$.a’, 10, ’$.c’, ’[true, false]’) | +----------------------------------------------------+ | {"a": 1, "b": [2, 3], "c": "[true, false]"} | +----------------------------------------------------+ mysql>  SELECT JSON_INSERT(@j, ’$.a’, 10, ’$.c’, CAST(’[true, false]’ AS JSON)); +------------------------------------------------------------------+ | JSON_INSERT(@j, ’$.a’, 10, ’$.c’, CAST(’[true, false]’ AS JSON)) | +------------------------------------------------------------------+ | {"a": 1, "b": [2, 3], "c": [true, false]} | +------------------------------------------------------------------+ 1 row in set (0.00 sec) mysql>  SELECT JSON_MERGE(’[1, 2]’, ’[true, false]’); +---------------------------------------+ | JSON_MERGE(’[1, 2]’, ’[true, false]’) | +---------------------------------------+ | [1, 2, true, false] | +---------------------------------------+ 1 row in set, 1 warning (0.00 sec) mysql>  SHOW WARNINGS\G *************************** 1. row *************************** Level: Warning Code: 1287 Message: ’JSON_MERGE’ is deprecated and will be removed in a future release. \  Please use JSON_MERGE_PRESERVE/JSON_MERGE_PATCH instead 1 row in set (0.00 sec) For additional examples, see the entry for  JSON_MERGE_PRESERVE() . Merges two or more JSON documents. Synonym for  JSON_MERGE_PRESERVE() ; deprecated in MySQL 8.0.3 and subject to removal in a future release. • JSON_MERGE( json_doc ,  json_doc [,  json_doc ] ...) The third and final value listed in the result is a quoted string and not an array like the second one (which is not quoted in the output); no casting of values to the JSON type is performed. To insert the array as an array, you must perform such casts explicitly, as shown here: 2366