I'm not sure what your expected outcome is but you need to pass the number 7 as the first argument and the array to compare against as the second like so:
````javascript
{
$set: {
offers: {
$cond: [
{
$in: [
7,
"$nl"
]
},
{
$concatArrays: [
"$offers",
[]
]
},
{
$concatArrays: [
"$offers",
[
{
"name": "minimal",
"prices": []
}
]
]
}
]
}
}
}
````
See [HERE](https://mongoplayground.net/p/9ENFyTFIilp) for a working example.
When you use `$expr`, the [operator expressions](https://docs.mongodb.com/manual/meta/aggregation-quick-reference/#operator-expressions) syntax changes a little:
{ $in: [ <expression>, <array expression> ] }
---
{
"$expr": {
"$not": {
"$and": [
{
"$in": [
"$PrName",
[
"pname"
]
]
},
{
"$in": [
"$AccountId",
[
"34562",
"88765",
"87654",
"12345"
]
]
}
]
}
}
}