In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests after December 31, 2025. Set up your security questions now so you can recover your account anytime, just log out and back in to get started. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Json Builder Output

tjamal1
8 - Asteroid

I am using Json Build option to create a json ouput file but the problem is that I dont need my records inside an object 

 

For example 

The output Alteryx is producing is 

{
"Record": [
{
"Customer Number": null,
"Customer Name": "Tariq Jamal",
"Email": "tariq003@syntio.com",
"Phone": "4169951111",
"City": "Toronto",
"Status": "Activated",
"Last Modeified": "2019-10-24 08:53:45",
"CVP Card": "2005267074657860000"
},
{
"Customer Number": null,
"Customer Name": "Jeff V",
"Email": "jeffv@gmail.com",
"Phone": "5325737363",
"City": "Oakville",
"Status": "Activated",
"Last Modeified": "2019-04-24 09:20:48",
"CVP Card": "1025753780104880000"
}

]

}

 

But i need 

 [
{
"Customer Number": null,
"Customer Name": "Tariq Jamal",
"Email": "tariq003@syntio.com",
"Phone": "4169951111",
"City": "Toronto",
"Status": "Activated",
"Last Modeified": "2019-10-24 08:53:45",
"CVP Card": "2005267074657860000"
},
{
"Customer Number": null,
"Customer Name": "Jeff V",
"Email": "jeffv@gmail.com",
"Phone": "5325737363",
"City": "Oakville",
"Status": "Activated",
"Last Modeified": "2019-04-24 09:20:48",
"CVP Card": "1025753780104880000"
}

]


I am attaching my workflow  

2 REPLIES 2
DiganP
Alteryx Alumni (Retired)

@tjamal1 The reason why the record tag is being created is you can't create an array at the top level without having having a array. 

 

What you can do is use the formula tool to update the JSON file created.

Replace([JSON], '{"Record":', '')

Replace([JSON], Right([JSON], 3), '}]')

These formulas will remove the Record: and fix the JSON brackets. 

Digan
Alteryx
DiganP
Alteryx Alumni (Retired)

@tjamal1 Attached is the workflow. 

Digan
Alteryx
Labels
Top Solution Authors