There are 3 documents with weight 42 and 1 document with .Params.w : “42”
{{ $p:=add 41 1 }}
{{ len (where $mains ".Weight" $p) }}
{{ len (where $mains ".Params.w" $p) }}
{{ len (where $mains ".Weight" 42) }}
{{ len (where $mains ".Params.w" "42") }}
result
0 0 3 1
The first one, I assume the result of add
is integer/number but can not be used in where
The second one, assuming the result of add
is string but failing too
The third and fourth is the working one.
Please enlighten me on this behaviour.