Search JSONB embedded array using SequelizeJs

query.$or.push(sequelize.literal(`to_json(array(select jsonb_array_elements("${hook.service.options.name}"."metadata"->'referenceIds') ->> 'id'))::jsonb ?| array['${query.$search}']`));

This article was updated on 2023-01-25

I'm nabeards. I'm a full stack JavaScript developer. I travel full time, a.k.a., Professional Wanderer, a.k.a., Digital Nomad.