Skip to content

JSON in sqlite

create table user(name,phone);

insert into user (name, phone) values("oz", json('{"cell":"+491765", "home":"+498973"}'));

select user.phone from user where user.name=='oz';
select json_extract(user.phone, '$.cell') from user;

select json_set(user.phone, '$.cell', 123) from user;

Sources