Thank you, Richard. That works! A couple follow up questions <br> 1) I wanted one of my generated keys to be the primary key, but sqlite isn't allowing generated fields to be primary keys. Is there a reason for this? <br> 2) One option is to simply create a secondary index on `id` and not declare it as the primary key. A second work-around is to have the primary key be generated at insert time, e.g. <code> INSERT INTO t1(myjson, id) VALUES('{"foo": "bar"}', (json_extract(myjson, '$.id'))); </code> But I'm unable to refer to other fields in json_extract (the error says `no such column myjson`). The above line works in mysql though. Is there a different syntax for sqlite? Thank you again for the help!