Closed gquittet closed 3 months ago
JSONLogic can test if a value is in a list of value
But with the actual implementation, the exported JSONLogic looks like this:
{ "in": [ [ "1.1.1.1", "2.2.2.2" ], { "var": "ip" } ] }
It can't work because it will check that the full array is in the ip variable.
ip
The expected result should be:
{ "in": [ { "var": "ip" }, [ "1.1.1.1", "2.2.2.2" ] ] }
The order [{"var": "example"}, "values"] is good for all operators, except when we want to check if a variable contains a string/array of string
My bad I use the wrong operator.
I should use "Any in" instead of "contains"
Great library! 🤟
JSONLogic can test if a value is in a list of value
But with the actual implementation, the exported JSONLogic looks like this:
It can't work because it will check that the full array is in the
ip
variable.The expected result should be:
The order [{"var": "example"}, "values"] is good for all operators, except when we want to check if a variable contains a string/array of string