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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
timschotz
Contributor II
Contributor II

JSON Output File with multiple fields

Hello,
I am using the tWriteJSONfield component to structure inbound rows into JSON syntax. This correctly structures my data rows like:
{
"office": {
"office_id": "1979",
"office_name": "AIR PRODUCTS",
"channel": [],
"address_line_1": "1775 EQUITY LANE",
"address_line_2": "PO BOX 1148",
"address_line_3": [],
"address_line_4": [],
"city": "TROY",
"state": "MI",
"zip_code": "48099-1155",
"country": "US",
"territories": {
"territory": {
"state_fips": "0",
"county_fips": "0"
}
}
}
}
My problem is that now I want all of my rows returned into a grouping element like "offices":{}. I have tried the following:
1. Using the tfileOutputJSON component after tWriteJSONfield. This will group my rows into a parent element, however each office element then has the quotes escaped like {\"office\":{\"office_id\":\"2231\",\"office_name\":
2. Changing my tWriteJSONField to include the "offices":{} grouping. This just adds "offices":{} to each output row without grouping
I see there are some new options in the 5.3 release that might be helpful, but I need to accomplish this in 5.1.2.
Any guidance is appreciated.
0683p000009MEQe.png 0683p000009MEj1.png
Labels (3)
1 Reply
Anonymous
Not applicable

Hi
What's the incoming data before tWriteJSONfield ? and What are your expected result? Do you just want to output only one row of json-string?
Shong