Complex rule for single fact #327
Closed
suresh-webonise
started this conversation in
General
Replies: 1 comment
-
@suresh-webonise it's not currently possible to express this in json-rules-engine without adding a custom operator. Specifically the part where you want to assert the one of the entries in |
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
Uh oh!
There was an error while loading. Please reload this page.
-
Suppose the fact is
const fact={
id:1,
username:'sureshk',
student:[{name:'zbc',percentage:100},{name:'zb',percentage:10}],
role:['coach','mentor'],
sport:['hockey','base']
}
and the rule should be
rule criteria => (student.name ='zbc' AND student.percentage=100) AND id=1 AND username='sureshk' AND role = 'coach' AND sport='hockey'
what will the json rules for the above rule criteria and facts
Beta Was this translation helpful? Give feedback.
All reactions