talend

Extract data from array/list with tExtractJsonFields in talend DI 7.2


I have a tJavaRow returning a list of objects, enter image description here

want to extract the data of each object with tExtractJsonFields. please provide me the configuration of the tExtractJsonFields component.


Solution

  • enter image description here

    1. Define the fields to be extracted (ex. role, organization,...)
    2. Select Xpath
    3. Define the input field to be parsed (ex. extractedDataList)
    4. Specify that you are looping from the JSON root
    5. Since the input is very simple, just give the JSON field (ex. Role) to be mapped to the column (ex. role)