11-20-2018 05:40 AM
I have list of fields with name like,
I need to map all the amount fields value into amount column in target.
Example:
Note: the fields is dynamic we can get “n” number of fields.
Looking forward any inputs/suggestions
11-20-2018 11:17 AM
Hi Surendar,
Assuming this is just a CSV, I plugged in your example data into a CSV generator, followed by a ‘group by N’ snap, which will group csv docs(up to 10,000) into a single doc assigned to any key you want, I chose ‘group’ for my key.
Then that will flow into a mapper with the expression as : “$.group.map(val => parseFloat(val.value))” with target field as ‘amount’ and you will be left with a list of all your values.
If you don’t care about the value being a string, you can leave out the parseFloat() call in the expression.
Hope this achieves your goal