Compare Arrays for Similar Item

I am trying to create a branch to trigger an event. I have multiple arrays of a set of objects that are organized into 2 arrays, one set is for Public, one set is for Private. Those same objects are in another set of arrays, one set is for 1 story, one set is for 2 stories.

I want to allow the selection to show all objects that are both in different combinations of the 2. Like show all private 2 stories. Or show all Public 2 Stories. Or show all Private 1 stories, or just show all 2 stories and so on.

Does anyone have any ideas? I can enable it to show all of a single array, but I don’t know how to compare it so it shows all objects that are true for 2 sets of arrays.

If I understand you correctly, you have:

  • 2 arrays of the same type of object (I’ll call them Array1 and Array2)
  • Some objects are members of both arrays
  • You want to be able to identify which objects are in both arrays.

One way to do this would be to pick one array, loop through it, and see if each item is present in the other array. If it is…do something with it.