Object Set Filter in Logic

For a logic function, say I have two inputs:

  1. Array with some IDs
  2. An object set

For this object set, I want to get all objects that have a property p = any of the IDs in my array. How would I do this?

For the example below, instead of ‘equals’, I’d want to have something like “includes any of”. Is there a way to do this without a FoO?