Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
yvesR
Contributor
Contributor

TOS - replace dynamically a JSON key

Hello,

 

I'm using Talend Open Studio for Data Integration (no Enterprise licence) and I'm expected to produce a JSON to post it to a REST API.

 

The JSON has something "special" that I'm unable to develop : It has keys that can change :

 

{
       "clientID": "id1",
       "wishes": { 
                  "wishes1" : {
                               "code" : "CND",
                               "name" : "candy"
                  },
                  "wishes2" : {
                               "code" : "CHC",
                               "name" : "chocolate"
                  },
...
"wishesX" : { "code" : "xxx",
"name" : "XXXXXXXXXXXX"
}
} }

 

As you can note, a key is changing : "wishes1", "wishes2", ... , "wishesX". OK, It looks like an array, but it is not ! and it's not me who has decided the API 😞 !

I'm unable to do such thing with tWriteJSONField. Can anyone help me ?

 

Thanks in advance,

 

Yves.

 

Labels (3)
1 Reply
yvesR
Contributor
Contributor
Author

Hello,

any help would be appreciated. Is it possible or not ?

Thanks in advance,

Yves