How to find which data points have a linked Id that's in an array?

How do you find which records have a linked record with an id of 1 or 2. You can assume [1,2] is an array.

The result of querying this should return ids [1,2,3,4,5 ]

Also, assume these are lists

3 replies