addOrReplace

addOrReplace(id, value)

Adds a new DataElement with the specified identifier and value, or replaces the existing element if an entry with the same ElementID is already present.

ParameterDescription
idA 3-letter identifier that uniquely specifies the jurisdiction-related data element.
valueThe text value assigned to the data element; this value will overwrite the existing one if the element already exists.

Returns: The DataElement instance that was added to the collection or updated in place.