This JSON structure is from a Spring Cloud server config:
{
"item[0].subitem[0].key": "value1",
"item[0].subitem[1].key": "value2",
"item[1].subitem[0].key": "value3",
"item[1].subitem[1].key": "value4"
}
I have a Flask app which will consume that format, but I need to convert it to this format for further processing:
{
"item": [
{
"subitem": [
{
"key": "value1"
},
{
"key": "value1"
}
]
},
{
"subitem": [
{
"key": "value1"
},
{
"key": "value1"
}
]
}
]
}