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
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
The json
type is just text. The advantage of using it is syntax check. Just that.
Check this question
you need to typecast it to Json in order to do that.
select '{"ww":11}'::json->'ww' as ww_value
returns ....
11