Se rendre au contenu
Menu
Cette question a été signalée
1 Répondre
3644 Vues

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
Ignorer
Meilleure réponse

Hi,

Please try this query,

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

Output:


Thanks

Avatar
Ignorer
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

Publications associées Réponses Vues Activité
1
mai 25
2460
1
avr. 25
3481
1
avr. 25
4310
1
avr. 25
1790
4
mars 25
6900