Alteryx Designer Desktop Discussions

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

Convert Excel to Json with Nested Array

JSEH
5 - Atom

 

Hi, 

 

I have the below table and want to convert to json with nested array Properties as shown in the example below. 


How can I achieve this please?

 

Excel Data:

OwnerIDPropertyIDProperty AddressRentBedroom
L001P00112 St LA3002
L001P0023 St SA4503
L002P0034 St SA5004
L003P00420 St LA4002

 

 

[  
  {
        "OwnerID": "L001",
		"Properties": [
			[
				{
					"PropertyID": "P001",
					"Property Address": "12 St LA",
					"Rent": "300",
					"Bedroom ": "2 "
				}
			],
			[
				{
					"PropertyID": "P002",
					"Property Address": "3 St SA",
					"Rent": "450",
					"Bedroom ": "3 "
				}
			]
			]
	},
    {
        "OwnerID": "L002",
        "Properties": [
			[
				{
					"PropertyID": "P003",
					"Property Address": "4 St SA",
					"Rent": "500",
					"Bedroom ": "4 "
				
				}
			]
			]},
    {
        "OwnerID": "L003",
        "Properties": [
			[
				{
					"PropertyID": "P004",
					"Property Address": "20 St LA",
					"Rent": "400",
					"Bedroom ": "2 "
				}
			]}
]

 

 

Thanks

JS

3 REPLIES 3
Felipe_Ribeir0
16 - Nebula

Hi @JSEH 

 

One way of doing this

 

Felipe_Ribeir0_0-1667128777581.png

 

grazitti_sapna
17 - Castor

@JSEH , Here is another way of getting your desired result.

 

grazitti_sapna_0-1667197103483.png

 

Sapna Gupta
Felipe_Ribeir0
16 - Nebula

Hi @JSEH 

 

It worked?

 

If yes, please accept it as a solution :)

 

Thanks!

Labels