# Hardcode multiple lineitems (array)

**URL:** https://connective.celigo.com/t/hardcode-multiple-lineitems-array/627
**Category:** Integration Apps
**Tags:** mapper, javascript, netsuite
**Created:** [October 12, 2022, 10:22am UTC](https://connective.celigo.com/t/hardcode-multiple-lineitems-array/627 "2022-10-12T10:22:53Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![marcopietersen](https://avatars.discourse-cdn.com/v4/letter/m/b77776/32.png) [@marcopietersen](https://connective.celigo.com/u/marcopietersen)
#### Post date: [October 12, 2022, 10:22am UTC](https://connective.celigo.com/t/hardcode-multiple-lineitems-array/627/1 "2022-10-12T10:22:53Z")

</div>

I'm trying to write multiple Currencies to a Netsuite Account. The salesorder has an array called Currency, that holds Currency records. And I would like to fill this list of currencies in a mapping.   
Something like this:   
{"internalId":"2", "internalid":"7"}

to

Currency[\*].Currency  
  
Anyone know how I would go about doing this?

---

<div class="post-metadata">

### Author: ![marcopietersen](https://avatars.discourse-cdn.com/v4/letter/m/b77776/32.png) [@marcopietersen](https://connective.celigo.com/u/marcopietersen)
#### Post date: [October 17, 2022, 7:12am UTC](https://connective.celigo.com/t/hardcode-multiple-lineitems-array/627/2 "2022-10-17T07:12:57Z")

</div>

This is the closest result I can get:  
 "Currency": {  
 "lines": [  
 {  
 "currency": "{\"1\",\"7\"}"  
 }  
 ]  
 }

But obviously I would like

"Currency": {  
 "lines": [  
 {  
 "currency": "1"  
 },   
 {  
 "currency": "7"  
 },   
 ]  
 }

---

<div class="post-metadata">

### Author: ![kathyanaqueeman](https://sea1.discourse-cdn.com/flex001/user_avatar/connective.celigo.com/kathyanaqueeman/32/9122_2.png) [@kathyanaqueeman](https://connective.celigo.com/u/kathyanaqueeman)
#### Post date: [November 11, 2022, 5:35pm UTC](https://connective.celigo.com/t/hardcode-multiple-lineitems-array/627/3 "2022-11-11T17:35:06Z")

</div>

Hello @marcopietersen,

I saw that you got a solution to this issue in a help ticket. In case others run into your issue, I'm posting the general idea behind the solution here.

The best way to map this information is to create a [preMap hook script](https://docs.celigo.com/hc/en-us/articles/5926315530139-Import-hooks#preMapHook) with an array of currencies. Then, you can map it against the Currency field in NetSuite.

Thanks!
