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

Allow for chaining if statements

Open beeme1mr opened this issue 10 months ago • 4 comments

Hey @TotalTechGeek, thanks for the great library. We're using it as part of a feature flag evaluation engine in a tool called flagd which is a reference implementation of OpenFeature, a CNCF project. Sorry about the link overload 😅 , but I thought the context would help.

We recently had a request to reduce the complexity of a flag definition (extended JsonLogic) by removing the necessity of nesting multiple if conditions. The JsonLogic site mentions that the if operator can take more than 3 arguments to create chained if/then elseif/then logic. However, this json-logic-engine explicitly states that this is not supported at the moment. Would it be possible to add support for this? Thanks!

beeme1mr avatar Mar 29 '24 14:03 beeme1mr