Transforms
transform turns the text read into the value you need: a number, a price, a date. Transforms run in order, on each value:
Actions
Data
"data": {
"price": { "amount": 1299.5, "currency": "EUR" },
"stock": 12,
"released": "2024-03-05"
}Text is always trimmed, with whitespace collapsed: no transform is needed for that.
Available transforms
| Transform | Input → value |
|---|---|
"number" | "1 299,50 €" → 1299.5, "$1,499.00" → 1499, "8 W" → 8 |
"price" | "1 299,50 €" → { "amount": 1299.5, "currency": "EUR" }. currency is an ISO code, from a symbol or a code in the text, or null |
"date" | "05/03/2024" → "2024-03-05", "October 2, 2026" → "2026-10-02". With a time: a full timestamp, "2026-10-02T14:30:00.000Z" |
"lowercase", "uppercase" | Change the case |
{ "regex": "…", "group": 1 } | The first match of a regular expression: its first group if it has one, or the group you choose (0 for the whole match) |
{ "replace": ["…", "…"] } | Replace every match of a regular expression; $1 inserts a group |
{ "map": { "…": … } } | Replace a whole value from a table: { "map": { "Three": 3, "Five": 5 } } turns "three" into 3. Matching ignores case and surrounding spaces; any other value becomes null |
Numbers and dates
Numbers: the first number in the text is read. Both 1,234.5 and 1.234,5 are understood: when both separators appear, the last one is the decimal separator. A lone comma followed by exactly three digits (1,234) is a thousands separator.
Dates: numeric dates are read day first (05/03/2024 is March 5). Month names are read in English.
When a value can't be converted
It becomes null, and later transforms are skipped: "number" on "Free" is null, not an error. With multiple, the null keeps its place in the array.
Regular expressions
Patterns use RE2 syntax: like JavaScript, without lookarounds ((?=…)) or backreferences (\\1). RE2 runs in linear time, so no pattern can slow the API down. In JSON, backslashes are doubled: "\\d+".