Question: I need to reference fields that are outside of my Path to many path in my import’s settings. How can I do this?
Answer: You can append _PARENT before any fields that you need to reference outside the Path to many that you set in your import. Note that ALL fields referenced anywhere in the import (mappings, import configuration, scripts, etc.) will be affected when One to many is set to Yes (advanced).
For example, let's say your import data looks like this:
{
"exampleField": "value",
"exampleArray": [
{ "innerField": "innerValue1" },
{ "innerField": "innerValue2" },
]
}
In this case, you would set your Path to many path as "exampleArray", so that it will iterate through the objects in that array. To reference "exampleField", you can use the following in the mappings:
_PARENT.exampleField
To reference the inner fields, you can just set them as standard mappings. Another example comparing One to many set to No versus set to Yes (advanced) for line level fields, you would change your mappings to this:
exampleArray[*].innerField --> innerField