Forum Discussion
2 Replies
- j_angelevskiContributor III
Hi @smeitei ,
First you need to group all input documents into a single array. For that you can use the Group by N snap with the setting “Group size” seto to 0. Then use a mapper with the following expression:jsonPath($, "Records[*]").map(val => val.get("Record")).join("!")
Output:
You can also use the Aggregate snap, but this will use the default delimeter.
- smeiteiNew Contributor II
@j.angelevski - Thanks for you input and it works.
- viktor_nContributor II
Another one solution for this.
jsonPath($, "$group[*].Record").reduce((acc, curr) => acc + "!" + curr)