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

Build complex rules, serialize them as JSON, and execute them in JavaScript

Results 79 json-logic-js issues
Sort by recently updated
recently updated
newest added

Suppose I have two arrays: - `var arr1 = [ 52, 66, 88, 43, 98 ]` - `var arr2 = [ 41, 42, 43, 45, 46, 49, 52, 53, 79...

I expected the following to evaluate to `true`: Data: ``` {"input": "x"} ``` Rule: ```json { "and": [ { "some": [ [ "x", "y" ], { "===": [ { "var":...

``` { "==": [ { "==": [ { "var": "parameter1" }, "Y2022" ] }, "Undefined" ] } ```

Loving the library so far! One thing that I'm juggling is doing an array operation that references the index. To avoid messing with the api of the `map` op, I...

Hello @jwadhams! Thanks you very much for this awesome library! 🎸 I inspired and create JIT version of **json-logic-js** -> https://github.com/darky/json-logic-js-jit **json-logic-js-jit** precompile JSON schemas and then you deal with...

logic: `{"var":0.1}` data: `["ab", "cd"]` evaluates to: `"b"` while logic: `{"var":1.0}` data: `["ab", "cd"]` evaluates to: `"cd"` presumably because: ``` >>> JSON.stringify(1.0) "1" ``` A solution would be to always...

let's consider this rule, looking for values between or equals 0 and 1 ``` const rule = { '

This project doesn't seem to be maintained much. I'm also seeing forks that have enhancements but are also not maintained. I'm looking for a json logic library with typescript support...

In rule like this ``` {"all" : [ { var: 'current_value' }, { in: [ { "var":"" }, [ 0, 'A', 'B', 'C', ' ' ] ] } ]} ```...