new RepeatingSegmentMap(options)
- Description:
- Used to map multiple segments of the same type within a loop to an array of objects.
This handles cases where multiple segments of the same identifier appear within a single transaction or loop.
- Source:
Example
const repeatingSegmentMap = new RepeatingSegmentMap({
segmentIdentifier: "N9",
values: {
qualifier: new FieldMap({
segmentIdentifier: "N9",
valuePosition: 0,
}),
reference: new FieldMap({
segmentIdentifier: "N9",
valuePosition: 1,
}),
},
});
Parameters:
Name |
Type |
Description |
options |
Object
|
Properties
Name |
Type |
Description |
segmentIdentifier |
String
|
The segment identifier. |
values |
Object
|
The mapping configuration for each occurrence of the segment. |
identifierValue |
String
|
The value of the field identifier (optional, for filtering). |
identifierPosition |
Number
|
The position of the field identifier (optional, for filtering). |
|