Sorry for the confusion. The JSON I'd like to process: {
"group": {
"prod": {
"info": {
"id": 13579,
"sub": {
"02468": {
"description": "Description 1",
"config": {
"os": "windows"
},
"build": {
"ver": "1133557799"
},
"checksums": {
"hex": {
"md5": "a8a64cef262a04de4872b68b63ab7cd8",
"sha1": "d80a9e5ac1c9f4343d30f70f9f6c2be247cee375"
}
}
}
},
"storage": {
"quota": 22446688,
"count": 999
}
}
},
"test": {
"info": {
"id": 13579,
"sub": {
"02468": {
"description": "Description 2",
"config": {
"os": "unix"
},
"build": {
"ver": "1133557799"
},
"checksums": {
"hex": {
"md5": "a8a64cef262a04de4872b68b63ab7cd8",
"sha1": "d80a9e5ac1c9f4343d30f70f9f6c2be247cee375"
}
}
}
},
"storage": {
"quota": 22446688,
"count": 999
}
}
}
}
} Below is what've tried so far: %let dir = %str(C:\Users\XXXXX\Desktop\Temp);
filename input "&dir\input.json";
libname input json;
data output;
set input.alldata;
run;
proc json out="&dir\output.json" nosastags nokeys pretty;
export output;
run; By running the code above, I got: [
[
1,
"group",
"",
"",
"",
"",
"",
"",
"",
0,
""
],
[
2,
"group",
"prod",
"",
"",
"",
"",
"",
"",
0,
""
],
[
3,
"group",
"prod",
"info",
"",
"",
"",
"",
"",
0,
""
],
[
4,
"group",
"prod",
"info",
"id",
"",
"",
"",
"",
1,
"13579"
],
[
4,
"group",
"prod",
"info",
"sub",
"",
"",
"",
"",
0,
""
],
[
5,
"group",
"prod",
"info",
"sub",
"02468",
"",
"",
"",
0,
""
],
[
6,
"group",
"prod",
"info",
"sub",
"02468",
"description",
"",
"",
1,
"Description 1"
],
[
6,
"group",
"prod",
"info",
"sub",
"02468",
"config",
"",
"",
0,
""
],
[
7,
"group",
"prod",
"info",
"sub",
"02468",
"config",
"os",
"",
1,
"windows"
],
[
6,
"group",
"prod",
"info",
"sub",
"02468",
"build",
"",
"",
0,
""
],
[
7,
"group",
"prod",
"info",
"sub",
"02468",
"build",
"ver",
"",
1,
"1133557799"
],
[
6,
"group",
"prod",
"info",
"sub",
"02468",
"checksums",
"",
"",
0,
""
],
[
7,
"group",
"prod",
"info",
"sub",
"02468",
"checksums",
"hex",
"",
0,
""
],
[
8,
"group",
"prod",
"info",
"sub",
"02468",
"checksums",
"hex",
"md5",
1,
"a8a64cef262a04de4872b68b63ab7cd8"
],
[
8,
"group",
"prod",
"info",
"sub",
"02468",
"checksums",
"hex",
"sha1",
1,
"d80a9e5ac1c9f4343d30f70f9f6c2be247cee375"
],
[
4,
"group",
"prod",
"info",
"storage",
"",
"",
"",
"",
0,
""
],
[
5,
"group",
"prod",
"info",
"storage",
"quota",
"",
"",
"",
1,
"22446688"
],
[
5,
"group",
"prod",
"info",
"storage",
"count",
"",
"",
"",
1,
"999"
],
[
2,
"group",
"test",
"",
"",
"",
"",
"",
"",
0,
""
],
[
3,
"group",
"test",
"info",
"",
"",
"",
"",
"",
0,
""
],
[
4,
"group",
"test",
"info",
"id",
"",
"",
"",
"",
1,
"13579"
],
[
4,
"group",
"test",
"info",
"sub",
"",
"",
"",
"",
0,
""
],
[
5,
"group",
"test",
"info",
"sub",
"02468",
"",
"",
"",
0,
""
],
[
6,
"group",
"test",
"info",
"sub",
"02468",
"description",
"",
"",
1,
"Description 2"
],
[
6,
"group",
"test",
"info",
"sub",
"02468",
"config",
"",
"",
0,
""
],
[
7,
"group",
"test",
"info",
"sub",
"02468",
"config",
"os",
"",
1,
"unix"
],
[
6,
"group",
"test",
"info",
"sub",
"02468",
"build",
"",
"",
0,
""
],
[
7,
"group",
"test",
"info",
"sub",
"02468",
"build",
"ver",
"",
1,
"1133557799"
],
[
6,
"group",
"test",
"info",
"sub",
"02468",
"checksums",
"",
"",
0,
""
],
[
7,
"group",
"test",
"info",
"sub",
"02468",
"checksums",
"hex",
"",
0,
""
],
[
8,
"group",
"test",
"info",
"sub",
"02468",
"checksums",
"hex",
"md5",
1,
"a8a64cef262a04de4872b68b63ab7cd8"
],
[
8,
"group",
"test",
"info",
"sub",
"02468",
"checksums",
"hex",
"sha1",
1,
"d80a9e5ac1c9f4343d30f70f9f6c2be247cee375"
],
[
4,
"group",
"test",
"info",
"storage",
"",
"",
"",
"",
0,
""
],
[
5,
"group",
"test",
"info",
"storage",
"quota",
"",
"",
"",
1,
"22446688"
],
[
5,
"group",
"test",
"info",
"storage",
"count",
"",
"",
"",
1,
"999"
]
] However, I'd like the output file to have the same structure as the original input file, which is: {
"group": {
"prod": {
"info": {
"id": 13579,
"sub": {
"02468": {
"description": "Description 1",
"config": {
"os": "windows"
},
"build": {
"ver": "1133557799"
},
"checksums": {
"hex": {
"md5": "a8a64cef262a04de4872b68b63ab7cd8",
"sha1": "d80a9e5ac1c9f4343d30f70f9f6c2be247cee375"
}
}
}
},
"storage": {
"quota": 22446688,
"count": 999
}
}
},
"test": {
"info": {
"id": 13579,
"sub": {
"02468": {
"description": "Description 2",
"config": {
"os": "unix"
},
"build": {
"ver": "1133557799"
},
"checksums": {
"hex": {
"md5": "a8a64cef262a04de4872b68b63ab7cd8",
"sha1": "d80a9e5ac1c9f4343d30f70f9f6c2be247cee375"
}
}
}
},
"storage": {
"quota": 22446688,
"count": 999
}
}
}
}
} Thanks a lot!
... View more