Filter API call with nested data into RG

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)

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.

If anyone has any ideas or would like some clarification please let me know.

This is my last (and biggest) issue before I can launch so if anyone knows how I would accomplish this it would be greatly appreciated.

P.S. I think there may be a way using list shifter but I am still trying to figure out processed list, I will keep thread updated.