Skip to main content

@idpass/data-collect-core / normalizeLegacyRelationFields

Function: normalizeLegacyRelationFields()

normalizeLegacyRelationFields(data): Record<string, unknown>

Defined in: utils/normalizeLegacyRelationFields.ts:70

Normalizes all relation fields in a data object that might be in legacy format. Recursively processes the object to find and normalize legacy [id, label] tuples.

Parameters

data

Record<string, unknown>

The data object to normalize

Returns

Record<string, unknown>

A new object with normalized relation fields