json-rules-engine-simplified
json-rules-engine-simplified copied to clipboard
Creating rules for collection
I have a use case where, I have to create rules for collections.
var fact ={ Person:{ Name:"ricky", phoneNumber:"1234567890", areaCode:"EA_001" }, address:[ {streetName:"georgeSt", BuildingName:"SHORE Villa", flatNumber:"007, flag:"red"}, {streetName:"Hardy St", BuildingName:"FRANKLIN", flatNumber:"008, flag:"blue"} ] }
If areaCode is "EA_001" and the flag is red then we should get a an error that ERROR: "Please be careful for animals" Is this some thing we can achieve.