json-logic icon indicating copy to clipboard operation
json-logic copied to clipboard

Can't use "max" on array stored at "var"

Open l4cr0ss opened this issue 5 years ago • 1 comments

This doesn't give the expected result:

let logic = {
  "max": {
    "var": "myarray"
  }
}

let data = {
  "myarray": [
    1,
    2,
    3
  ]
}

JSONLogic.apply(logic,data)
result: `null`

image

l4cr0ss avatar Jun 03 '19 16:06 l4cr0ss

This example is working properly in at least the ruby bindings

l4cr0ss avatar Jun 03 '19 16:06 l4cr0ss