Hi!
We get an XML respond from our ERP, when we make an API call. We use the Item Lists (splitOutItems) module to iterate the arrays we get. It is works like charm.
However in some cases the answer array only contains 1 object. At that case the Item Lists Node got an error, becouse it is not an array.
The parsed json:
[
{
"vissza": {
"hiba": "0",
"valasz": {
"elem": {
"sorszam": "R22/00083",
"statusz": "N",
"torolt": "0",
"fej": {
"kelt": "2022.05.20",
"valuta": "HUF",
"arfolyam": "1",
"part_kod": "36",
"afaval": "HUN",
"megjegyzes": "",
"nyelv": ""
},
"tetelek": {
"tetel": {
"azon": "225",
"cikksz": "32670-AA0100",
"netto_ar": "0",
"menny": "1",
"tmegjegy": "{ Előlapi fénykép: Hátlapi szöveg: Hátlapi fénykép: https://www.gravirgyar.hu/wp-content/uploads/extra_product_options/e48b0dd9fe55b6248d241fe5b999b9de/1DEDA7C1-BB94-4BEE-8A59-9CED8227EC93.jpeg Egyedi üzenet: }",
"menny_info": {
"beszerzett": "0",
"teljnek_vett": "0"
}
}
}
}
}
}
}
]
The error:
Is there any workaround to handle the situation when there will be only one object?
Thank you!
Describe the issue/error/question
What is the error message (if any)?
Problem executing workflow
There was a problem executing the workflow:
"Item Lists2: The provided field ‘vissza.valasz.elem.tetelek.tetel’ is not an array"