Skip to content

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

@evyMascarenhas

Description

@evyMascarenhas

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions