How Convert or Flatten a Nested JSON
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hello Community,
I have been exploring Alteryx now for about 3 months. I'm very excited with its possibilities.
Can somoene let me know how Alteryx deals with Nested JSONs?
For example I'm able to flatten the attached Nested JSON to CSV by simply dragging the Json to any online JSON to CSV converter.
Is it possible to use of the Atleryx tools to do something similar?
So, basically, I would like to convert or flatten the attached JSON to CSV with Alteryx
Thanks
Solved! Go to Solution.
- Labels:
- Connectors
- Datasets
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @carltonp Do you have a sample output you could share? Have you tried the JSON Parse tool? Typically the first step to flattening json is using a JSON parse tool followed by a crosstab tool.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @carltonp
Do you have a sample of what the final data would look like.
Alteryx provides a JSON parse tool, however depending on the structure of your data you may need to do some additional data massaging. In my experience its typically a combination of the record id, transpose/cross tab, and text to columns.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @carltonp
Yes, it is possible. Take a look at the attached workflow, you usually can do it for any JSON using these same steps.
If the provided answer helped you to solve the problem/was correct, please accept it as a solution :)
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi Luke,
Thanks for reaching out.
Please find attached a sample output.
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi Felipe,
That's great. I can't wait to test it on my json.
In the meantime, I have sent a sample output
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi Feliple,
The workflow is missing the companyId
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi Felipe
Thanks for reaching out again. However, there is something strange going on with your output.
If you look at my output, there should only be 3 rows with the following company Ids
00041424
00053417
00048796
But you only have output for 00041424. Or am looking at this incorrectly? How would this look if exported to a CSV file.
Take a look at my output
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@carltonp you are right, something got missing when it was inputed. Give me some minutes, gonna try to figure out.
