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

Announcements
Save $650 on Qlik Connect, Dec 1 - 7, our lowest price of the year. Register with code CYBERWEEK: Register
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Formatting tRESTResponse as object instead of array

Hi All,
I'm fairly new to talend and I have what may be a bit of a newbie question...  I am trying to return a JSON object using a tRESTResponse component but i can't figure out how to get my response wrapped in curly brackets??  It appears that the square brackets are being wrapped around the response in the tRESTResponse component so I can't just wrap the string in curly brackets...  
Job flow:
 tRESTRequest -> tJavaFlex -> tMap -> tRESTResponse
                                             ^                                        
                                         subJob
What I need:

{"data": }


What I get: 

]
Labels (2)
3 Replies
Anonymous
Not applicable
Author

Hello 
I am not able to reproduce the problem on version 6.2.1. Which version of studio are you using? Can you upload a screenshot to show the settings of tMap?
Regards
Shong
Anonymous
Not applicable
Author

Thanks for your response shong, i was able to work around this by just wrapping my output in the curly brackets and then referencing the return array position 0.  I don't believe this is an issue with talend, I was just curious if there was a config i was missing in the tRESTResponse...
Anonymous
Not applicable
Author

OK, thanks for your feedback.