Help building queries based on multiple conditions from an array of objects
Hello, I'm having trouble formulating a query that will match rows to multiple conditions at the same time.
Suppose I have an array of objects like :
and a Table1 with :
where param1 should match up with col1, and param2 should match with col2.
In this example, how can I query Table1 so that I only retrieve rows where (col1 == "val1" && col2 == "val2") or (col1 == "val3" && col2 == "val4") ?
If I extract all the values of param1 and param2, and use them each in an inArray, like :
I run the risk of also returning values such as
col1 == "val1"
col2 == "val4"
and
col1 == "val3"
col2 == "val2"
which were not in the original array.
Is there a way to do this?
Thank you
1 Reply
Something like this: