Sample Input:
[{ "name": "monika", "id": 12, "add": { "city": "pune", "country": "IND" }, "ref": [ { "ref1": "abc", "ref2": "xyz" }, { "ref1": "ABC", "ref2": "XYZ" } ] }]
Expected Output:
name,id,add/city,add/country,ref/ref1/0,ref/ref2/0,ref/ref1/1,ref/ref2/1
monika,12,pune,IND,abc,xyz,ABC,XYZ
Tried with below dataweave , but getting issue with array of objects.
There should be an index in key of array of objects.
e.g. ref/ref1/0 for 0th object
ref/ref1/1 for 1st object
Please help me with Dataweave 1.0 script.
답변을 작성하세요...
0/9000