Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

json array to string in postgresql

SELECT 
	ID
	,(
		SELECT string_agg(trim(JsonString::text, '"'), ', ')
		FROM jsonb_array_elements(JsonData->'Name') JsonString
	) AS StringArray
FROM   tbl_TestJsonArray;
Source by www.dbrnd.com #
 
PREVIOUS NEXT
Tagged: #json #array #string #postgresql
ADD COMMENT
Topic
Name
4+6 =