Exclude the JSON row structure from files

When creating the JSON files the JSON data is enclosed in square brackets. The opening and closing square brackets are the defining characteristics of a JSON row structure. When we group the export data, the data passes through the rest of the flow in row structure. These square brackets can be removed by using the below handlebar code in the JSON Document section of the file transfer step.

{
{{#each batch_of_records}}
{{#each record}}{{#unless @first}},{{/unless}}"{{@key}}": {{{jsonSerialize this}}}
{{/each}}
{{/each}}
}

Leave a comment

Your email address will not be published. Required fields are marked *