JSON to CSV conversion
Yeah!... This conversion looks simple when I see this scenario. But once I started developing the job, I learnt one new concept in JSON.
That is looping through single array!
As usual we have to take tFileInputJSON for taking a file from folder. Extracting it as a single JSON string file. Configure the component as mentioned below image.
then we need to extract the required fields from JSON file. zzpaymentinfo is a array structure so, we need to loop through the JSON array and extracting it. In this configuration we have selected Xpath.
In this setting Loop Jsonpath query is array that is mentioned in the JSON file. just extracting all the element and send it to next process. That is sorting based on "zzxblnr".
Now, Once we run the job we'll get the result as expected. Main concept is looping the JSON array.
Thank you for reading!