Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
GGeded1618913227
Contributor
Contributor

Extract field Json Referencing

Hello Everyone,

I have a JSON like this :

 "listOfMovies": {

 "numberMovie" : 15

 },

  

  

 "movies" : {

    "15" : {

"name": "Matrix",

"duration":"blabla"

},

  "16" : {

"name": "NameOfMovie",

"duration":"blabla"

},

}

I want to get a name field of movies in terms of what it contains the field "numberMovies",

So if the numberMovie field is "15" , therefore I want the name "Matrix" for example

I hope this is understandable, How can I do with tExtractJsonFields ?

Thanks everyone for your participation 🙂

Labels (3)
1 Reply
Anonymous
Not applicable

Unfortunately this is not possible with the build-in components because the build-in components always maps the attribute names to schema column names.

You can do such things with the components: https://exchange.talend.com/#marketplaceproductoverview:marketplace=marketplace%252F1&p=marketplace%252F1%252Fproducts%252F1438&pi=marketplace%252F1%252Fproducts%252F1438%252Fitems%252F2982

Use here the component tJSONDocOpen to read in the json and the component tJSONDocTraverseFields

This component returns every attribute and value and the path to it. Now you can filter afterwards what you need.