I have a json blob column with data listed below in postgreSQL,column name is data, for building a chart in drupal10 website. i have to use db_select to get data based on a condtion in json key named chart_title
[ { "to": "Joint Programme", "nid": 20073, "from": "Funds Mobilized", "value": 272172483, "status": true, "weight": 5.8, "api_uri": "http://example.com", "to_color": "#b6ada7", "timestamp": 1708075222, "chart_type": "bar", "embed_code": "
i have tried this
$connection = \Drupal::database();
$result = $connection->select('chart_data', 't')
->fields('t', ['data'])
->condition('t.data', 'By Data', '=')
->execute()
->fetchAll();