Json parse subvalues

Highlighted
Five Stars

Json parse subvalues

Hello,

I am trying to parse the following json data:

{
    "clinical_trials": {
        "total": 1,
        "results": [
            {
                  "position": "Principal Investigator",
                  "title": "Combined Treatment With XYZ",
                  "study_phase": "Phase II",
                  "conditions": [
                           "AAAAA BBBBBB CCCCC"
                   ],
                   "start_date": "2018-06-08T00:00:00",
                   "status": "Recruiting"
           }
        ]
    }
}

 

The output for "conditions" looks like this:

 

tInputFileJson

tFileInputJSON.JPG

 

tExtractJson:

tExtractJson.JPG

 

Here's the tInputFileJson component

Job_tFileInputJSON.JPG

 

Here's the tExtract component:

Job_tExtractJson.JPG

 

I have tried all sorts of variations on "conditions[*]" and so on but they either produce null or the data with the square brackets and quotes round it.

 

To be clear, there can be more than one value in the field.

 

Hope you can help.

Many thanks,

Bob.

Tags (1)

Accepted Solutions
Eleven Stars

Re: Json parse subvalues

TalendImage.JPGTalendImage1.JPGTalendImage2.JPGTalendImage3.JPG

 

Output 

 

[statistics] connected
1|Principal Investigator|AAAAA BBBBBB CCCCC
1|Principal Investigator|AAAAA BBBBBB CCCCD
[statistics] disconnected

Regards
Abhishek KUMAR
Five Stars

Re: Json parse subvalues

Perfect!

Thank you.


All Replies
Eleven Stars

Re: Json parse subvalues

TalendImage.JPGTalendImage1.JPGTalendImage2.JPGTalendImage3.JPG

 

Output 

 

[statistics] connected
1|Principal Investigator|AAAAA BBBBBB CCCCC
1|Principal Investigator|AAAAA BBBBBB CCCCD
[statistics] disconnected

Regards
Abhishek KUMAR
Five Stars

Re: Json parse subvalues

Perfect!

Thank you.

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

Agile Data lakes & Analytics

Accelerate your data lake projects with an agile approach

Watch