@wang4978 wrote:
I create a service select databse postgreSQL. And creata table ,insert data in the database.
It’s the sql:create table if not exists name_age ( info jsonb ) insert into name_age values('{"id":1,"name":"Ben", "age":18}'); insert into name_age values('{"id":1,"name":"Jon", "age":20}');
How to filter
"age":20
by REST API .
Hope that the result is to execute the following sql:
select info from name_age where info @> '{"age":20}'::jsonb
REST API :http://127.0.0.1:8099/api/v2/postgretest/_table/name_age
Posts: 1
Participants: 1