Jsonb column access

#1

Hi, I have a Postgres/timescale datasource, but the data itself is in a jsonb column (as eachj device has a different set of sensors). Is there any syntax trick to access the json values. In pure postgres I can do stuff like select cast(elements->>‘temperature’ AS INTEGER) from datapoints …
Any way to do this in Grafana ?

#2

Just to auto-answer, cast(elements->>‘temperature’ AS float) works fine in the end.