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.

What’s New for Talend Spring ’19

Watch the recorded webinar!

Watch Now

Tutorial

Introduction to Talend Open Studio for Data Integration.

Watch

Downloads and Trials

Test drive Talend's enterprise products.

Downloads

Definitive Guide to Data Integration

Practical steps to developing your data integration strategy.

Download