Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odgovori
3632 Prikazi

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


 

Avatar
Opusti
Best Answer

Hi,

Please try this query,

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

Output:


Thanks

Avatar
Opusti
Avtor

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

Avtor

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 Odgovori Prikazi Aktivnost
1
maj 25
2448
1
apr. 25
3467
1
apr. 25
4296
1
apr. 25
1778
4
mar. 25
6884