I want to convert a JSON into xlsx file using R. Here is the scenario that I am expecting:
Here is my R object.
myObject <- {
"Alabama" : {
"Hoover": {
"x":[33.40556, 33.40565, 33.40555],
"y":[-86.81111, -86.81314, -86.81343]
},
"Dothan": {
"x":[31.22722],
"y":[-85.40722]
},
...
},
"Alaska" : {
"Chugiak" : {
"x":[61.38778],
"y":[-149.48139]
},
...
}
...
}
Here is the result that I want in xlsx:
Alabama Hoover 33.40556 -86.81111
Alabama Hoover 33.40565 -86.81314
Alabama Hoover 33.40555 -86.81343
Alabama Dothan 31.22722 -85.40722
Alabama Gadsden 34.01028 -86.01028
Alaska Chugiak 61.38778 -149.48139
...
P.S : Can I get the same result from an R object that is auto_unboxed such as:
myObject <- {
"Alabama" : {
"Hoover": {
"x":[33.40556, 33.40565, 33.40555],
"y":[-86.81111, -86.81314, -86.81343]
},
"Dothan": {
"x":31.22722,
"y":-85.40722
},
...
},
"Alaska" : {
"Chugiak" : {
"x":61.38778,
"y":-149.48139
},
...
}
...
}