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;
Links
Sources
- SQLite JSON1 example for JSON extract\set - Stack Overflow
- python loop over sqlite select with .fetchmany() until no entries left - Stack Overflow