JSON to CSV conversion
Learn and grow

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!

Input JSON Struture
Output JSON Structure

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.

tFileInputJSON configuration

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.

tExtractJSONFields configuration

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".

tSortRow configuration

Now, Once we run the job we'll get the result as expected. Main concept is looping the JSON array.

Job

Thank you for reading!




















要查看或添加评论,请登录

社区洞察

其他会员也浏览了