Matan is currently using (json_col->'field')::float
and is looking for a simpler method.
Matan Perelmuter
Asked on Aug 17, 2023
The easiest way to get JSON columns as float in SQL is by using the ->>
operator directly without the need for casting.
Here is the simplified approach:
json_col->>'field'