Jsonb column access

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 ?

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