Is it possible to pass an array of objects as facts and then compare against a nested attribute #325
abhchowdhury
started this conversation in
General
Replies: 2 comments 1 reply
-
@abhchowdhury was this resolved? |
Beta Was this translation helpful? Give feedback.
1 reply
-
You could write some custom operators (but not really that reusable) that would do certain assertions, given that the object structure remains the same. Something like |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I have an array of Objects, say [{ssn: '1234', netPay: '2000'}, {ssn: '4567', netPay: '4000'}]. Rules can be something like, ssn !=null and netPay>0. Is it possible to run this list against these set of rules? One way will be to use a loop in my javascript code and send this one at a time for the rule engine to evaluate the rules. But I was wondering whether this can do something like Drools, where I pass the whole list and then the Rule Engine takes care of the looping and validation.
Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions