Concatenate field values from multiple rows to single row/documents
I am looking for a solution to concat all the field values from multiple row into single separated by delimited symbol ‘!’.
Input data:
[
{“Record”: “1”},
{“Record”: “2”},
{“Record”: “5”},
{“Record”: “4”},
{“Record”: “6”}
]
Expected Output:
[
{“Records”: “1!2!5!4!6”}
]
Remapping all field names can be done using the Object.mapKeys() method. For example:
Hope this helps!
Hi mkadange,
Welcome to SnapLogic and community. Yes, you can simply drag and drop the columns on the target path as you did for input/expression. Please try that out once for a small set and selecting All and dropping it on the target will do the needful.
Also, let's assume, out of 400, you need to select 40 which are not in the order, drag and drop will automatically map it for you.
Please keep us posted with your results.
Regards,
Darsh