Task
Some products in a JSON catalog have an empty or too-short barcode. The import should keep only items with a valid-looking code.
Short answer
Open barcode and add an export condition: regular expression ^(?:[0-9]{8}|[0-9]{12,14})$ (matches a digits-only string with length 8, 12, 13, or 14; it does not validate the check digit).
How to do it in Eofferix
In the JSON snapshot, select
barcodeinside the repeated block.
The selected field belongs to one repeated object. Open the value settings.

The animation shows opening the field settings. Add an export condition:
barcode^(?:[0-9]{8}|[0-9]{12,14})$.
The condition selects only the needed object before export.
Before / after
Before
source data{
"products": [
{
"sku": "SKU-15001",
"name": "Hudson lamp",
"barcode": "4601234567890",
"price": "1290.00"
},
{
"sku": "SKU-15002",
"name": "Parker chair",
"barcode": "12345",
"price": "8400.00"
},
{
"sku": "SKU-15003",
"name": "Harbor shelf",
"barcode": "",
"price": "990.00"
}
]
}After
result{
"products": [
{
"sku": "SKU-15001",
"name": "Hudson lamp",
"barcode": "4601234567890",
"price": "1290.00"
}
]
}What to keep in mind
- The regular expression checks the format, but not the mathematical EAN/GTIN check digit.
- If your catalog allows internal barcodes with another length, change the list of lengths in the expression.