I have a column in my table as follows:
{
1:{type: 0},
2:{type: 1}...
}
i have tried using using whereJsonContains('table.column->type', 0) but it's not working,
whereRaw("table->column @> '{\"type\": 0}'::jsonb"); is not working either, i guess because of the nested json structure. How can i make this work?
->whereJsonContains('your.column', ['type' => '0'])?