SQLite Forum

json_append array with multiple values
Login
There is no array-concatenation function.  But you can insert your NULLs
one-by-one using the '#' path notation:

~~~~~
  UPDATE example
    SET json=json_insert(json,'$.items.items[#]',NULL,
                              '$.items.items[#]',NULL,
                              '$.items.items[#]',NULL,
                              '$.items.items[#]',NULL);
~~~~~

Here is another (complete, copy/paste-able) script to illustrate:

~~~~~
  CREATE TABLE t1(j JSON);
  INSERT INTO t1(j) VALUES('{"a":[0,1,2,3],"b":[4,5,6,7]}');
  UPDATE t1
    SET j=json_insert(j,'$.a[#]',10,'$.a[#]',11,'$.a[#]',12,'$.a[#]',13);
  SELECT * FROM t1;
~~~~~

The output is:

~~~~~
  {"a":[0,1,2,3,10,11,12,13],"b":[4,5,6,7]}
~~~~~