SDK API Reference / deduplicateJourneysByBundle
Function: deduplicateJourneysByBundle()
deduplicateJourneysByBundle<
T>(journeys):T[]
Deduplicate journeys by bundle name, keeping only the latest version. This ensures each journey bundle appears only once in listings. Supports both JourneyListItem (flat) and Journey (nested attributes) types.
Type Parameters
T
T extends object
Parameters
journeys
T[]
Array of journeys (may contain multiple versions per bundle)
Returns
T[]
Array with only the latest version of each journey bundle