We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Json data read in Alteryx Desktop

minvestis
6 - Meteoroid

Hi,

 

I need help to read following JSON format to convert into table format.

 

Example :1

 

{"key":{"PEOPLE": "2180"},"coreEntityKey":{"EMP":{"id": "2180"}},"attributes":[{"key": "PEOPLE_MANAGER_NAME","rawValue": "Dex, Albert","value": "Dex, Albert"},{"key": "PEOPLE_EMAIL"},{"key": "EMP_COMMON_FULL_NAME","rawValue": "Kochi, Limot","value": "Kochi, Limot"}],"children":[],"summaryListDisplay":[],"rootEntity": "PEOPLE","customProperties":{}}
 
Example : 2
 
{"key":{"PEOPLE": "2183"},"coreEntityKey":{"EMP":{"id": "2183"}},"attributes":[{"key": "PEOPLE_MANAGER_NAME","rawValue": "Ola, Pola","value": "Ola, Pola"},{"key": "PEOPLE_EMAIL","rawValue": "nix.jerry@test.com","value": "nix.jerry@test.com"},{"key": "EMP_COMMON_FULL_NAME","rawValue": "Nix, Jerry","value":"Nix, Jerry"}],"children":[],"summaryListDisplay":[],"rootEntity": "PEOPLE","customProperties":{}}
 
Expected output:
 
EMP IDEMP_COMMON_FULL_NAMEPEOPLE_EMAILPEOPLE_MANAGER_NAME
2180Kochi LimotNULLDex Albert
2183Nix Jerryola.pola@test.comOla Pola

 

Please advise, how to achieve above output? I tried using JSON but I am not getting expected output.

 

Thanks

Mayank Patel

2 REPLIES 2
minvestis
6 - Meteoroid
Expected output:
 
EMP IDEMP_COMMON_FULL_NAMEPEOPLE_EMAILPEOPLE_MANAGER_NAME
2180Kochi LimotNULLDex Albert
2183Nix Jerrynix.jerry@test.comOla Pola
danilang
19 - Altair
19 - Altair

Hi @minvestis 

 

The JSON Parse tool is your friend here.  It splits the json into name/value pairs.  From there its a matter of splitting the attribute names using a Regex tool and a couple of crosstabs to get your output

w.pngr.png

The names still have the comma in them, but removing them is left as an exercise for the student
 

Dan

 

 

 

Labels
Top Solution Authors