I am trying to query a table which a json column
select *
from subscription
where extras->>'end_date' > 1592424632;
this errors out saying
ERROR: invalid input syntax for integer: "end_date"
I have tried type casting
select *
from subscription
where extras->>'end_date'::int4 > 1592424632;
ERROR: invalid input syntax for integer: "end_date"
and extras column sample input looks like
{"end_date": 1592425146, "capacity": 1, "start_date": 1584562746, "devices": "", "quantity": 10}