Forum Discussion
j_angelevski
4 years agoContributor III
Hi @KTsnap ,
Assuming the values will be separated by “,” in each field, then we can easily do this with a Mapper.
$.extend(...$.entries().map(val => {[val[0]]: val[1].split(",").sort().join(",")}))
Target path: $
This will work for every field in the input doc.
Sample input data:
Result: