The model is stored in postgresql. Something like:
{
id: <serial>
data: <json> {
someIds: [<int>, ...]
}
}
How to add a rule jsonb_path_match(data::jsonb, 'exists($.someIds[*] ? (@ == 3))')
to the filter (where)?
In this case, the value '3' '(@ == 3)'
shall be determined by the user.