Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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

0683p000009M3Lf.jpg

 

tExtractJson:

0683p000009M3Wm.jpg

 

Here's the tInputFileJson component

0683p000009M3Wr.jpg

 

Here's the tExtract component:

0683p000009M3Ww.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.

Labels (3)
1 Reply
Anonymous
Not applicable
Author

Hi Bob,

 

     I  believe this one is a duplicate of the post below where you have already got the solution.

 

https://community.talend.com/t5/Design-and-Development/Json-parse-subvalues/m-p/157256#M96041

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂