Unquoting JSON strings; print JSON strings without quotes
34
votes
4
answers
53041
views
SELECT json_array_elements('["one", "two"]'::json)
gives result
| json_array_elements | | :------------------ | | "one" | | "two" |I would like to have the same but without the quotes: one two Looks like I can't use [
->>
](https://stackoverflow.com/a/40928412/1024794) here because I don't have field names in the JSON. It's just an array of strings.
Postgres version:
PostgreSQL 10.0 on x86_64-apple-darwin, compiled by i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00), 64-bit
Asked by Maxim Yefremov
(465 rep)
May 27, 2018, 06:24 PM
Last activity: Nov 11, 2021, 04:10 PM
Last activity: Nov 11, 2021, 04:10 PM