数据是json数组
[{ "customer": "John Doe", "items": {"product": "Beer","qty": 6}}, { "staff" : "Jack" }]
答案 0 :(得分:0)
将其存储为json
(或jsonb
)
create table sameesh
(
data json
);
insert into sameesh (data)
values
('[{ "customer": "John Doe", "items": {"product": "Beer","qty": 6}}, { "staff" : "Jack" }]');