02-06-2024 09:01 AM - edited 02-06-2024 09:02 AM
Hello there,
I am getting a response from an API then I passed it through the JSON Parser and it got something as below. You will see that I have items/product that I would like to have in separated rows in a CSV file. I tried with a FOR EACH loop using products array, but it does not iterate, the input is empty, but I am taking the datapill from the JSON parser, what am I missing?
Thanks
{
"document": {
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Product Claim Details",
"type": "object",
"properties": {
"products": {
"type": "array",
"items": [
{
"Vendor": "CANADA",
"BillingDate": "2022/09/02",
"InvoiceNumber": "SL1",
"productNumber": "14-1",
"description": "MUG SET",
"status": "FD",
"vendorPartNumber": "MUGCAN",
"units": 0,
"claimAmounts": 0,
"initialBillingAvailable": 0.14,
"shortfallSurplus": -0.14
},
{
"Vendor": "CANADA",
"BillingDate": "2022/09/02",
"InvoiceNumber": "SL2",
"productNumber": "14-2",
"description": "BOWL",
"status": "FD",
"vendorPartNumber": "29CN",
"units": 0,
"claimAmounts": 0,
"initialBillingAvailable": 2.25,
"shortfallSurplus": -2.25
}
]
}
},
"required": [
"products"
]
}
}
Solved! Go to Solution.
02-06-2024 09:43 AM
I took another look and this is very interesting! I can't get the example you provided to work in the JSON parser as is.
I have to remove this line:
"required": ["products"]
I guess the one-dimensional array is throwing off the parser.
Once this is removed, I can access the items data pill without a problem.
Give this a shot, hopefully it will work.
02-06-2024 12:47 PM
Can you send some screenshots of your recipe? Something must be misconfigured. Let's figure it out.