tsansoterra
3 years agoNew Contributor
Flattening JSON
Hello, I am struggling to flatten out some JSON. I looked at a bunch of the examples and did my best to figure it out but still having no luck.
Below is what I am looking for.
Current:
[
{
"items": {
"item1": {
"1": "i1_1",
"2": "i1_2"
},
"item2": {
"1": "i2_1",
"4": "i2_2",
"6": "i2_3"
},
"item3": {
"5": "i3_1"
}
}
}
]
Desired Output:
[
{
"items": {
"item1_1": "i1_1",
"item1_2": "i1_2",
"item2_1": "i2_1",
"item2_4": "i2_2",
"item2_6": "i2_3",
"item3_5": "i3_1"
}
}
]
Any help would be appreciated.
Thanks,
Todd