Have a JSONB column with data like this:
{"title": "Some book!", "uniqueId": "11264299-2543-566"}
When I try to select the values, they are returned with double quotes surrounding them...
SELECT 'Some book!', json_data->'title' FROM myJsonTable
Returns:
Some book! "Some book!"
Instead of using json_data->'title', I needed to use jsonb_extract_path_text(json_data, 'title')...
Edit: Or as Lucas said in the comment, use json_data->>'title'...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With