Alteryx Designer Desktop Discussions

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

JSON Build

Analyst323
8 - Asteroid

I am working to build out a JSON output (screenshot attached)

 
Right now, I have alteryx successfully outputting the transactions JSON in my workflow.
But I need help on creating the array for the data portion. Attaching a sample of my workflow. 
3 REPLIES 3
KGT
12 - Quasar

So, there might be some funny things to deal with like true not having quotes...

 

Rename your JSON field to transactions, and then transpose again (reconciliationId, ledgertype, upsert, transactions) and then JSON Build again.

 

I think you should be able to do it all at once, but not sure the method or more importantly, the nuances. The above should get you close.

Analyst323
8 - Asteroid

I gave up! I just wrote the JSON schema in the formula tool which seems to work. I'm not sure the JSON builder tool works that well when the script is nested several times

KGT
12 - Quasar

Yep, that's best, you get full control that way. I think the JSON Build is good for creating objects, but I've always had to piece them together.

 

The JSON Build will create JSON objects. Looking at the screenshot again and for a little more information. You have a JSON array made up of a single JSON object, and inserted into another JSON object. So, for the JSON Build to just handle that and know that the transactions object needs to be in a single value array, would be a huge stretch. And that information is relative to the system that wants that JSON.

Labels
Top Solution Authors