Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
1 Відповісти
3612 Переглядів

i want to extract data from table: product_template field "name" where data is in json format, i want to extract portion of data as below (2nd screenshot) in blue rectangle (without double quotes " ), please help how i can do it? 


i am using PgAdmin4, here are 2 screenshots:



regards


 

Аватар
Відмінити
Найкраща відповідь

Hi,

Please try this query,

SELECT name ->> 'en_US' AS product_name FROM product_template;

Output:


Thanks

Аватар
Відмінити
Автор

thanks for help... it works fine.
but, as mentioned, i want it without double quotes " ... how to remove it?
regards

I have updated the answer, please check

Автор

thanks a bunch!!! brillieant !! it saves to write a function. i thought i have to write a function and use replace function to eliminate double quotes.
regards

Related Posts Відповіді Переглядів Дія
1
трав. 25
2433
1
квіт. 25
3451
1
квіт. 25
4271
1
квіт. 25
1754
4
бер. 25
6859