You can apply one or more transform rules to convert large export or import JSON/XML data to a smaller JSON structure that is more readable and easier to understand.
Transform rules allow you to:
- flatten complex JSON structures.
- provide meaningful field names.
- select a limited set of fields for processing.
This article generally explains how to implement transform rules, but for a complete list of transform rules, see the Transformation Rules Guide.
Use the following steps to apply transform rules:
- On the import or export page, click the pencil icon beside the Transform Rules field.
- Click the Rule-#1 drop-down list box, and then click Edit Rule.
- In this rule, the first level of transformation is automatically done. You can perform modification under Pre Transformed Record section if required.
Note: All the received fields are available at this level. If you create multiple rules, these fields are then passed on to the next rule.
- Click Accept.
- From the Rule-#1 drop-down menu, click Add Next Rule.
- From Rule-#2, click Edit Rule.
- Under Transform Mappings, map the required fields. This simplifies the JSON structure further.
Note: integrator.io only passes mapped fields into the flow, so verify that all required fields are accurately mapped.
- Click Accept.
- Click Save.
Note: This functionality is only available in the beta version of integrator.io.
- Copy a body field into all the elements of a list.
- Copy a list field into a body level field.
- Dynamically inspect and restructure an entire record.
- Iterate through a list to perform a calculation, and then store the results of the calculation in a body field.
- Iterate through lists within lists, and then reorganize all elements into a brand new list.