I've successfully created the below table on 9.5.1.0:
CREATE TABLE json_test (
id serial primary key,
data jsonb
);
and successfully inserted this record:
INSERT INTO json_test (data) VALUES ('{"0":"INVALID","1":"BELOW","2":"EQUAL","3":"ABOVE"}')
and I am successfull in returning the entire record that I inserted via:
SELECT * FROM json_test WHERE data::jsonb ? '1';
but how do I return the value associated with '1', i.e. "BELOW" ?