SOLVED
Convert Table To JSON
Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Alc2020
7 - Meteor
‎12-22-2020
08:17 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi,
I have the following table.
home_address | |||||||
first_name | last_name | address_line1 | address_line2 | city | state | zip | country |
John | Doe | #123 Street 123 | Suite 123 | Brooklyn | New York | 12312 | US |
Name2 | |||||||
and so on |
How can I make this into a JSON output like below?
{
"first_name": "John",
"last_name": "Doe",
"home_address": {
"address_line1": "#123 Streat 123",
"address_line2": "Suite 123",
"city": "Brooklyn",
"state": "New York",
"zip": "12312",
"country": "US"
}
}
Thank you very much.
Solved! Go to Solution.
Labels:
- Labels:
- Datasets
- Tips and Tricks
4 REPLIES 4
Alteryx
‎12-22-2020
08:36 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @Alc2020
Please check the attached. I built a hierarchy for the address to appear the way you want it. Hope it helps. Cheers!
ChiN
Alteryx Alumni (Retired)
‎12-22-2020
08:45 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
hi @Alc2020 ,
We have Json build tool that can do that. Check out the workflow attached. Does this format work for you?
15 - Aurora
‎12-22-2020
08:51 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
‎12-22-2020
06:50 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thank you very much for your help!
