Need json_unnest_as_text()
Issue #4
wontfix
json_unnest()
is great:
david=# select json_unnest('["foo", "bar"]');
json_unnest
-------------
"foo"
"bar"
But what if I want those values as text rather than JSON? Conversion to text keeps the double-quotes:
david=# select e::text from json_unnest('["foo", "bar"]') e;
e
-------
"foo"
"bar"
I think we need a way to unnest as text, similar to how we fetch text values:
david=# select json_unnest_as_text('["foo", "bar"]');
json_unnest_as_text
---------------------
foo
bar
Comments (2)
-
reporter -
- changed status to wontfix
needs to be a separate extension as it's not part of the upstream changes
- Log in to comment
Here's an SQL version in the meantime: