Remove Duplicates From API in repeating group

Hi, I have an api call that returns a bunch of nested data (several flights) the flights are organized where there are slices (flight there and flight back) that are composed of segments (a flight from JFK to ATL).

So one slice would have two segments (going and returning). Often, the api will return slices that have several slices that have the same segments (<- problem)

For example: Slice 1 will have: segment 1 (going) and segment 2 (returning)
Slice 2 will have: segment 3 (going) and segment 2 (returning)

and there are ~50 slices per api call

So there will be several instnaces of the same flight being repeated in the repeating group when I only want the original

when slices have the same segments and I display this in a repeating group it will show the same segment/flight listed multiple times in the RG

I would like to find a way that allows me to filter out the repeat flights in the RG , but I cannot for the life of me figure out how.

I think there may be a way using list shifter but I am still trying to figure out processed list.

And for the duplicates, I’ve tried Unique Items on the state but it doesn’t work.

Any ideas on how this could work?