Trying to figure out an aggregation result for a JsonB Column with the following data
part | data
-----------------------------------
PART1 |[{"type":"box","reference": "box1"},{"type": "dispatch","reference":
"d1"},{"type": "dispatch","reference": "d2"}]
Need to write a query that can extract an aggregation result for only type = dispatch The expected result from the query is
part | data
-----------------------------------
PART1 |d1,d2
Found a few examples across for these executions but none of them apply to a JSONB with an array, most of them are able to work with objects and even when filter is is not needed.