Anda perlu menggunakan ->>
nilai hasil string:
WITH mytable(json_field) AS ( VALUES
('{"power": 200}'::JSONB),
('{"power": 400}'::JSONB),
('{"power": 0}'::JSONB),
('{"power": 146297}'::JSONB)
)
SELECT * FROM mytable where (json_field->>'power')::INTEGER < 2;
Hasilnya adalah:
json_field
--------------
{"power": 0}
(1 row)