# One to many not importing any records

**URL:** <https://connective.celigo.com/t/one-to-many-not-importing-any-records/125>\
**Category:** Integrator.io\
**Tags:** import, json, netsuite\
**Created:** [May 23, 2024, 6:15am UTC](https://connective.celigo.com/t/one-to-many-not-importing-any-records/125 "2024-05-23T06:15:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![milchodimkov](https://avatars.discourse-cdn.com/v4/letter/m/57b2e6/32.png) [@milchodimkov](https://connective.celigo.com/u/milchodimkov)\
**Post date:** [May 23, 2024, 6:15am UTC](https://connective.celigo.com/t/one-to-many-not-importing-any-records/125/1 "2024-05-23T06:15:03Z")

</div>

I have the following JSON structure coming from the previous step (where **respData** was the response of a response mapping):

```
[{ "id": "10000001", "recordType": "salesorder", "Document Number": "SOXXXXXX", "respData": { "orderNo": 123456, "customerOrderNo": "7890", "lineItems": [ { "id": 987654, "lineItemId": 50150, "orderNo": 123456 }, { "id": 987655, "lineItemId": 50151, "orderNo": 123456 }], "customFields": { "deliveredDate": null } } }]
```

I want the next step to execute as many times as there are **lineItems** in the **lineItems** array.  
  
My understanding is that the one-to-many path should be **respData**. **lineItems** , however it imports zero records.  
  
I tried several combinations, but nothing works.  
I also tried sending just one record by disabling one-to-many and I just send **respData.lineItems[0].myField** - this works fine and the target application receives the record. The one-to-many won't work though. No error message, but also no records created.

---

<div class="post-metadata">

**Author:** ![tylerlamparter](https://sea1.discourse-cdn.com/flex001/user_avatar/connective.celigo.com/tylerlamparter/32/9204_2.png) [@tylerlamparter](https://connective.celigo.com/u/tylerlamparter)\
**Post date:** [May 23, 2024, 4:11pm UTC](https://connective.celigo.com/t/one-to-many-not-importing-any-records/125/2 "2024-05-23T16:11:09Z")

</div>

@milchodimkov can you remove the one-to-many, add a preMap script, then force an error by putting a script function that doesn't exist in the preMap script itself? I'd like to see what you're given there.

Also, what destination application are you going to?
