i'm building a dynamic rule engine and jexl contributes a lot. Appreciating for jexl very much!
But there is a problem that has been bothering me for a long time. Just like the example code above:
the rule engine expects that "a.b[0] != null" should be false, but jexl throws an exception like the comment.
im wondering could jexl acts like lodash.get when he evals "a.b[0]" ? or any other suggestions?
const context = {"a": 1};
const exp = "a.b[0] != null";
jexl.eval(context, exp);//Cannot read properties of undefined (reading '0')
i'm building a dynamic rule engine and jexl contributes a lot. Appreciating for jexl very much! But there is a problem that has been bothering me for a long time. Just like the example code above: the rule engine expects that "a.b[0] != null" should be false, but jexl throws an exception like the comment. im wondering could jexl acts like lodash.get when he evals "a.b[0]" ? or any other suggestions?
Looking forward to your reply❤