Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get json value in pl/pgsql

I have json string like '{"ww":11}'

How can i get value 11 in pl/pgsql ?

I try:

json_var := '{"ww":11}'::json

json_var->ww;
json_var->"ww";
json_var.ww;

All of this failed.

Please help! Dmitry

like image 273
Dmitry Mordovin Avatar asked May 20 '26 19:05

Dmitry Mordovin


1 Answers

The json type is just text. The advantage of using it is syntax check. Just that.

Check this question

like image 161
Clodoaldo Neto Avatar answered May 23 '26 15:05

Clodoaldo Neto



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!