Syntax:
JSON_ARRAY_APPEND(json_doc, path, val[, path, val] ...)

Appends values to the end of the indicated arrays within a JSON
document and returns the result. Returns NULL if any argument is NULL.
An error occurs if the json_doc argument is not a valid JSON document
or any path argument is not a valid path expression or contains a * or
** wildcard.

The path-value pairs are evaluated left to right. The document produced
by evaluating one pair becomes the new value against which the next
pair is evaluated.

If a path selects a scalar or object value, that value is autowrapped
within an array and the new value is added to that array. Pairs for
which the path does not identify any value in the JSON document are
ignored.

URL: https://dev.mysql.com/doc/refman/8.4/en/json-modification-functions.html

