-
-
Notifications
You must be signed in to change notification settings - Fork 73
/
1_single_object.schema.json
32 lines (32 loc) · 1.15 KB
/
1_single_object.schema.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
{
"parser_settings": {
"version": "omni.2.1",
"file_format_type": "json"
},
"transform_declarations": {
"FINAL_OUTPUT": { "object": {
"$order.id": { "xpath": "order_id" },
"tracking_number": { "custom_func": {
"name": "upper",
"args": [ { "xpath": "tracking_number" } ]
}},
"items": { "array": [{ "xpath": "items/*", "object": {
"sku": { "custom_func": {
"name": "javascript",
"args": [
{ "const": "sku.toUpperCase().substring(0, 5)" },
{ "const": "sku" }, { "xpath": "item_sku" }
]
}},
"total_price": { "custom_func": {
"name": "javascript",
"args": [
{ "const": "num * price" },
{ "const": "num" }, { "xpath": "number_purchased", "type": "int" },
{ "const": "price" }, { "xpath": "item_price", "type": "float" }
]
}}
}}]}
}}
}
}