LoopMap

LoopMap

new LoopMap(options)

Description:
  • A LoopMap is used to map a Loop to the specified object key value in an array.
Source:
Example
const objectToMapKeyValuesTo = {
header: {
 // header field maps
},
detail: {
 itemArray: new LoopMap({
   position: 0,
   values: {
   itemCode: new FieldMap({
   segmentIdentifier: "W07",
   identifierValue: null,
   identifierPosition: null,
   valuePosition: 4,
   }),
   lotCode: new FieldMap({
   segmentIdentifier: "W07",
   identifierValue: null,
   identifierPosition: null,
   valuePosition: 7,
   }),
   },
 })
}
};
Parameters:
Name Type Description
options Object
Properties
Name Type Description
position Number The position of the Loop in the transaction.
values Object An object containing FieldMaps.