// Find users where preferences contains { theme: 'dark' }
User.findAll({ where: { preferences: { [Op.jsonContains]: { theme: 'dark' } } } })
// SQL (PostgreSQL): WHERE preferences @> '{"theme":"dark"}'
// SQL (MySQL): WHERE JSON_CONTAINS(preferences, '{"theme":"dark"}')
// Check if JSON array contains a value
User.findAll({ where: { tags: { [Op.jsonContains]: 'admin' } } })
Helper to create JSON contains condition Checks if JSON column contains a specific value or object