CacheControl/json-rules-engine

How to feed engine multiple facts as array!

nileio opened this issue · 1 comments

Hi,
sorry it is a basic question but I have read the docs, and searched the Issues log. I am not sure why I could not find a way to feed the engine multiple facts at the same time. I tried an array of values, array of objects, etc.
My values are simple numbers , so ideally I should just simply pass them as an array. I expect the engine to run each item in the array as a separate fact and run the rules against them.
It works only if I have a for loop and run the engine on every iteration of the loop for a single value.

I am guessing there is a better efficient way than that. Can someone please provide an example ?

I had read and understood more from the code - basically a loop to add facts is the correct way of doing it