How to access JSON nested value within a `select()`
Having this schema:
I would like to access
debt
values to compute the total in the select()
:
It does not seem possible as the moment or did I miss something?2 Replies
@binajmen Drizzle doesn't have a util type to handle this case with TS functions, so you'll have to use the
sql
operator for this:
You can find more info on accessing JSON properties in PG here: https://www.postgresql.org/docs/9.3/functions-json.html
PostgreSQL Documentation
JSON Functions and Operators