Given the Postgres 10 JSONB data field partner_json:
{
\"guid\": \"a659883cedf44131a700a6f563f2c484\",
\"name\": \"Testing\",
\"referrerId\": 1,
\"co
I encountered the same error when trying to determine how to use OR. It turned out the issue was with how I was calling OR, not with the actual value, even though the error message stated "Invalid value". This worked for me:
where: {
[Sequelize.Op.or]: [{book: true}, {hardcover: true}]
},
I used this page as a reference: Sequelize API Reference
I believe aliases are now deprecated, so perhaps this will work:
where: {
partner_json: {
communication: {
email: {
[Sequelize.Op.contains]: [{
value: partner_email
}]
}
}
}
},