Hi all. I’m working on a transformation from Excel data to XML. XML structure is complex, it is related to expenses on budgets and projects. I’m transforming each column to JSON and GroupBy to create the structure and the items that are collections (lists). When the structure is ready I transform everything to JSON and then to XML. Everything is almost done, but the problem is that where there are lists/collections, the JSON and XML is taking each list as separate item, so instead of having a list with items, I’m getting several lists with the items.
Attach you find the knar fileAwards.knar (50.6 KB)
and a folder output-awards where there is the expenditures-target.xml (XML to generate) and Row0.xml (the xml generated by the workflow). The expected expenditure structure is:
- financialFundings
- financialFunding1
- budgets
- budget1
- expenditures
- expenditure1
- expenditure2
- expenditures
- budget2
…
- budget1
- budgets
- financialFunding2
- budgets
…
- budgets
- financialFunding1
But, the structure I got is:
- financialFundings
- financialFunding1
- budgets
- budget1
- expenditures
- expenditure1
- expenditures
- expenditure2
- expenditures
- budget1
- budgets
- budget2
…
- budget2
- budgets
- financialFunding1
- financialFundings
- financialFunding2
- budgets
…
- budgets
- financialFunding2
I’m assuming when I’m using the GroupBy, the lists are created like this. So, I wonder if there is something to do in the GroupBy or should I use JSON Transformer or String Manipulation to correct this. Just looking for a good solution.
Thanks.
Mario