Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
1 Beantwoorden
3933 Weergaven

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
Annuleer
Beste antwoord

Hi,

Please try this query,

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

Output:


Thanks

Avatar
Annuleer
Auteur

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

Auteur

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

Gerelateerde posts Antwoorden Weergaven Activiteit
5
sep. 25
21081
3
aug. 25
3027
1
mei 25
2915
1
apr. 25
3876
1
apr. 25
4743