Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The "or" operator doesn't work as it should. #38

Open
evyMascarenhas opened this issue Jun 16, 2022 · 1 comment
Open

The "or" operator doesn't work as it should. #38

evyMascarenhas opened this issue Jun 16, 2022 · 1 comment

Comments

@evyMascarenhas
Copy link

Hi,
I'm trying to apply a complex rule that works on the js version, but not in the package:
Example:

{
  "or": [
    {
      "and": [
        { ">": [{ "var": "DebtService" }, 0.5] },
        { ">=": [{ "var": "AnnualRevenue" }, 700] }
      ]
    },
    {  ">": [{ "var": "BNIScore" }, 10] }
  ]
}

data:
{ "DebtService" : 0.7, "AnnualRevenue": 100, "BNIScore": 20}

In this case, the "and" block returns false, and the ">" block returns true. Therefore, the final result should be "True"
The JS version returns true, but when I try it in the .net project with this nuget package, it returns false.
Any suggestions? Maybe the structure in C# should be different than the one used in JS?

Thanks!

@MaxHayman
Copy link

This works fine for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants