Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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 🙂
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.