I have a jsonb column which just stores a value, not an object with key/value, e..g
"right"
"[0.563426, -0.104352, 0.819550]"
"[-1.024841, -0.235817, 0.591118]"
"1.4531"
"right"
"[0.563426, -0.104352, 0.819550]"
"[-1.024841, -0.235817, 0.591118]"
"1.4531"
When I know this value is a floating point value I would just like to cast
SELECT value::real but you can't do that. You can do SELECT (jsonbcol->>'somekey')::real, but these columns just store a value.
What are my options here? This is json data, sometimes it is an array, etc, but for certain rows I know it to be a floating point value.
--
Wells Oliver
wells.oliver@xxxxxxxxx
--
Wells Oliver
wells.oliver@xxxxxxxxx