Skip to Content
Menu
This question has been flagged
1 Atsakyti
3624 Rodiniai

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


 

Portretas
Atmesti
Best Answer

Hi,

Please try this query,

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

Output:


Thanks

Portretas
Atmesti
Autorius

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

Autorius

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 Replies Rodiniai Veikla
1
geg. 25
2437
1
bal. 25
3459
1
bal. 25
4276
1
bal. 25
1761
4
kov. 25
6870